mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +00:00
lib/protocol: Remove unused channel Connection.preventSends (#6473)
Co-authored-by: greatroar <@>
This commit is contained in:
parent
cc1b003f21
commit
ea5c9176e1
@ -165,7 +165,6 @@ type rawConnection struct {
|
|||||||
closeBox chan asyncMessage
|
closeBox chan asyncMessage
|
||||||
clusterConfigBox chan *ClusterConfig
|
clusterConfigBox chan *ClusterConfig
|
||||||
dispatcherLoopStopped chan struct{}
|
dispatcherLoopStopped chan struct{}
|
||||||
preventSends chan struct{}
|
|
||||||
closed chan struct{}
|
closed chan struct{}
|
||||||
closeOnce sync.Once
|
closeOnce sync.Once
|
||||||
sendCloseOnce sync.Once
|
sendCloseOnce sync.Once
|
||||||
@ -219,7 +218,6 @@ func NewConnection(deviceID DeviceID, reader io.Reader, writer io.Writer, receiv
|
|||||||
closeBox: make(chan asyncMessage),
|
closeBox: make(chan asyncMessage),
|
||||||
clusterConfigBox: make(chan *ClusterConfig),
|
clusterConfigBox: make(chan *ClusterConfig),
|
||||||
dispatcherLoopStopped: make(chan struct{}),
|
dispatcherLoopStopped: make(chan struct{}),
|
||||||
preventSends: make(chan struct{}),
|
|
||||||
closed: make(chan struct{}),
|
closed: make(chan struct{}),
|
||||||
compression: compress,
|
compression: compress,
|
||||||
}
|
}
|
||||||
@ -656,7 +654,6 @@ func (c *rawConnection) send(ctx context.Context, msg message, done chan struct{
|
|||||||
select {
|
select {
|
||||||
case c.outbox <- asyncMessage{msg, done}:
|
case c.outbox <- asyncMessage{msg, done}:
|
||||||
return true
|
return true
|
||||||
case <-c.preventSends:
|
|
||||||
case <-c.closed:
|
case <-c.closed:
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user