Skip to content

Commit

Permalink
remvoe response dropping mechanism in the connection
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisMontagne committed Mar 8, 2019
1 parent ab4d0f0 commit 2fc1c86
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ type Connection struct {
Locales []string // Server locales

closed int32 // Will be 1 if the connection is closed, 0 otherwise. Should only be accessed as atomic

// Number of frame to drop before before considering it as the valid response
dropped uint32
}

type readDeadliner interface {
Expand Down Expand Up @@ -491,11 +488,6 @@ func (c *Connection) dispatch0(f frame) {
c <- Blocking{Active: false}
}
default:
if d := atomic.LoadUint32(&c.dropped); d > 0 {
atomic.AddUint32(&c.dropped, ^uint32(0))
return
}

c.rpc <- m
}
case *heartbeatFrame:
Expand Down Expand Up @@ -718,7 +710,6 @@ func (c *Connection) call(ctx context.Context, req message, res ...message) erro

select {
case <-ctx.Done():
atomic.AddUint32(&c.dropped, 1)
return ErrCanceled
case err, ok := <-c.errors:
if !ok {
Expand Down

0 comments on commit 2fc1c86

Please sign in to comment.