Skip to content

Commit 2fc1c86

Browse files
remvoe response dropping mechanism in the connection
1 parent ab4d0f0 commit 2fc1c86

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

connection.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,6 @@ type Connection struct {
106106
Locales []string // Server locales
107107

108108
closed int32 // Will be 1 if the connection is closed, 0 otherwise. Should only be accessed as atomic
109-
110-
// Number of frame to drop before before considering it as the valid response
111-
dropped uint32
112109
}
113110

114111
type readDeadliner interface {
@@ -491,11 +488,6 @@ func (c *Connection) dispatch0(f frame) {
491488
c <- Blocking{Active: false}
492489
}
493490
default:
494-
if d := atomic.LoadUint32(&c.dropped); d > 0 {
495-
atomic.AddUint32(&c.dropped, ^uint32(0))
496-
return
497-
}
498-
499491
c.rpc <- m
500492
}
501493
case *heartbeatFrame:
@@ -718,7 +710,6 @@ func (c *Connection) call(ctx context.Context, req message, res ...message) erro
718710

719711
select {
720712
case <-ctx.Done():
721-
atomic.AddUint32(&c.dropped, 1)
722713
return ErrCanceled
723714
case err, ok := <-c.errors:
724715
if !ok {

0 commit comments

Comments
 (0)