mirror of https://github.com/cbeuw/Cloak
Rearrange if statement
This commit is contained in:
parent
369f3c781c
commit
ae3f97df1e
|
|
@ -92,10 +92,11 @@ func (p *bufferedPipe) WriteTo(w io.Writer) (n int64, err error) {
|
|||
return n, er
|
||||
}
|
||||
p.rwCond.Broadcast()
|
||||
}
|
||||
} else {
|
||||
p.rwCond.Wait()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (p *bufferedPipe) Write(input []byte) (int, error) {
|
||||
p.rwCond.L.Lock()
|
||||
|
|
|
|||
|
|
@ -98,11 +98,11 @@ func (d *datagramBuffer) WriteTo(w io.Writer) (n int64, err error) {
|
|||
return n, er
|
||||
}
|
||||
d.rwCond.Broadcast()
|
||||
continue
|
||||
}
|
||||
} else {
|
||||
d.rwCond.Wait()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (d *datagramBuffer) Write(f Frame) (toBeClosed bool, err error) {
|
||||
d.rwCond.L.Lock()
|
||||
|
|
|
|||
Loading…
Reference in New Issue