mirror of
https://github.com/v2fly/v2ray-core
synced 2024-02-27 03:18:06 +00:00
fix race condition in stream writing
This commit is contained in:
@@ -77,6 +77,9 @@ func (this *Stream) Write(data *alloc.Buffer) error {
|
||||
}
|
||||
this.access.RLock()
|
||||
defer this.access.RUnlock()
|
||||
if this.closed {
|
||||
return io.EOF
|
||||
}
|
||||
if this.buffer == nil {
|
||||
return io.EOF
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user