update go.mod

This commit is contained in:
2024-03-10 14:10:01 +08:00
parent a81d74ac45
commit 48f630564f
6 changed files with 70 additions and 23 deletions
+4 -3
View File
@@ -7,6 +7,7 @@ import (
"context"
"errors"
"fmt"
"math"
"math/rand"
"net"
"os"
@@ -54,7 +55,7 @@ func (c *ClientCommon) Connect(network string, addr string) error {
return errors.New("client already run")
}
c.stopCtx, c.stopFn = context.WithCancel(context.Background())
c.queue = starnet.NewQueueCtx(c.stopCtx, 4)
c.queue = starnet.NewQueueCtx(c.stopCtx, 4, math.MaxUint32)
conn, err := net.Dial(network, addr)
if err != nil {
return err
@@ -83,7 +84,7 @@ func (c *ClientCommon) ConnectTimeout(network string, addr string, timeout time.
return errors.New("client already run")
}
c.stopCtx, c.stopFn = context.WithCancel(context.Background())
c.queue = starnet.NewQueueCtx(c.stopCtx, 4)
c.queue = starnet.NewQueueCtx(c.stopCtx, 4, math.MaxUint32)
conn, err := net.DialTimeout(network, addr, timeout)
if err != nil {
return err
@@ -514,7 +515,7 @@ func (c *ClientCommon) Reply(m Message, value MsgVal) error {
}
func (c *ClientCommon) ExchangeKey(newKey []byte) error {
pubKey, err := starcrypto.DecodePublicKey(c.handshakeRsaPubKey)
pubKey, err := starcrypto.DecodeRsaPublicKey(c.handshakeRsaPubKey)
if err != nil {
return err
}