From ea5c9176e121a08d22e46b6b2c5b5bf9f41d712a Mon Sep 17 00:00:00 2001 From: greatroar <61184462+greatroar@users.noreply.github.com> Date: Sun, 29 Mar 2020 18:09:53 +0200 Subject: [PATCH] lib/protocol: Remove unused channel Connection.preventSends (#6473) Co-authored-by: greatroar <@> --- lib/protocol/protocol.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/protocol/protocol.go b/lib/protocol/protocol.go index ea271df05..59b185812 100644 --- a/lib/protocol/protocol.go +++ b/lib/protocol/protocol.go @@ -165,7 +165,6 @@ type rawConnection struct { closeBox chan asyncMessage clusterConfigBox chan *ClusterConfig dispatcherLoopStopped chan struct{} - preventSends chan struct{} closed chan struct{} closeOnce sync.Once sendCloseOnce sync.Once @@ -219,7 +218,6 @@ func NewConnection(deviceID DeviceID, reader io.Reader, writer io.Writer, receiv closeBox: make(chan asyncMessage), clusterConfigBox: make(chan *ClusterConfig), dispatcherLoopStopped: make(chan struct{}), - preventSends: make(chan struct{}), closed: make(chan struct{}), compression: compress, } @@ -656,7 +654,6 @@ func (c *rawConnection) send(ctx context.Context, msg message, done chan struct{ select { case c.outbox <- asyncMessage{msg, done}: return true - case <-c.preventSends: case <-c.closed: case <-ctx.Done(): }