Merge branch 'main' into acl-sync-protocol
This commit is contained in:
commit
3c5e3bed96
@ -149,9 +149,6 @@ func (s *objectSync) processHandleMessage(msg HandleMessage) {
|
|||||||
err = context.DeadlineExceeded
|
err = context.DeadlineExceeded
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var cancel context.CancelFunc
|
|
||||||
ctx, cancel = context.WithDeadline(ctx, msg.Deadline)
|
|
||||||
defer cancel()
|
|
||||||
}
|
}
|
||||||
if err = s.handleMessage(ctx, msg.SenderId, msg.Message); err != nil {
|
if err = s.handleMessage(ctx, msg.SenderId, msg.Message); err != nil {
|
||||||
if msg.Message.ObjectId != "" {
|
if msg.Message.ObjectId != "" {
|
||||||
|
|||||||
@ -189,7 +189,7 @@ func (p *peer) openDrpcConn(ctx context.Context) (dconn *subConn, err error) {
|
|||||||
tconn := connutil.NewLastUsageConn(conn)
|
tconn := connutil.NewLastUsageConn(conn)
|
||||||
bufSize := p.ctrl.DrpcConfig().Stream.MaxMsgSizeMb * (1 << 20)
|
bufSize := p.ctrl.DrpcConfig().Stream.MaxMsgSizeMb * (1 << 20)
|
||||||
return &subConn{
|
return &subConn{
|
||||||
Conn: drpcconn.NewWithOptions(conn, drpcconn.Options{
|
Conn: drpcconn.NewWithOptions(tconn, drpcconn.Options{
|
||||||
Manager: drpcmanager.Options{
|
Manager: drpcmanager.Options{
|
||||||
Reader: drpcwire.ReaderOptions{MaximumBufferSize: bufSize},
|
Reader: drpcwire.ReaderOptions{MaximumBufferSize: bufSize},
|
||||||
Stream: drpcstream.Options{MaximumBufferSize: bufSize},
|
Stream: drpcstream.Options{MaximumBufferSize: bufSize},
|
||||||
@ -296,7 +296,7 @@ func (p *peer) gc(ttl time.Duration) (aliveCount int) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return len(p.active) + len(p.inactive)
|
return len(p.active) + len(p.inactive) + int(p.incomingCount.Load())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *peer) Close() (err error) {
|
func (p *peer) Close() (err error) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user