update go.mod
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user