mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2025-06-14 19:46:05 +00:00
actually use doCancel in writeNoCopy
This commit is contained in:
@ -292,6 +292,9 @@ func (c *Conn) writeNoCopy(msg FlowKeyMessage) error {
|
||||
var cancel util.Cancellation
|
||||
var doCancel bool
|
||||
phony.Block(c, func() { cancel, doCancel = c._getDeadlineCancellation(c.writeDeadline) })
|
||||
if doCancel {
|
||||
defer cancel.Cancel(nil)
|
||||
}
|
||||
var err error
|
||||
select {
|
||||
case <-cancel.Finished():
|
||||
|
Reference in New Issue
Block a user