mirror of https://github.com/cbeuw/Cloak
When timeout no longer needs to be enforced, no need to schedule a broadcast.
This commit is contained in:
parent
ee5968afee
commit
3d103e728c
|
|
@ -105,7 +105,7 @@ func (d *datagramBufferedPipe) WriteTo(w io.Writer) (n int64, err error) {
|
|||
if !d.rDeadline.IsZero() {
|
||||
d.broadcastAfter(time.Until(d.rDeadline))
|
||||
}
|
||||
} else {
|
||||
} else if enforceTimeout {
|
||||
d.broadcastAfter(d.wtTimeout)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ func (p *streamBufferedPipe) WriteTo(w io.Writer) (n int64, err error) {
|
|||
if !p.rDeadline.IsZero() {
|
||||
p.broadcastAfter(time.Until(p.rDeadline))
|
||||
}
|
||||
} else {
|
||||
} else if enforceTimeout {
|
||||
p.broadcastAfter(p.wtTimeout)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue