mirror of https://github.com/cbeuw/Cloak
Revert "Fix WriteTo receive loop"
This reverts commit 501f7dda
Address #117
This commit is contained in:
parent
aed624a87b
commit
ff10cbf67b
|
|
@ -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,10 +98,11 @@ func (d *datagramBuffer) WriteTo(w io.Writer) (n int64, err error) {
|
|||
return n, er
|
||||
}
|
||||
d.rwCond.Broadcast()
|
||||
}
|
||||
} else {
|
||||
d.rwCond.Wait()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (d *datagramBuffer) Write(f Frame) (toBeClosed bool, err error) {
|
||||
d.rwCond.L.Lock()
|
||||
|
|
|
|||
Loading…
Reference in New Issue