You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 9, 2020. It is now read-only.
When multiple goroutines invoke Read/Write simultaneously, there will be race conditions loading/assigning on Cipher, readBuf and writeBuf. There's no any lock mechanism protecting this.
It wouldn't cause any problems so far because shadowsocks seems not using Conn anywhere in concurrent context.
I'm just suggesting that Conn should eventually be thread-safe because that's how a net.Conn interface behaves.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
GoDoc on net.Conn says
Multiple goroutines may invoke methods on a Conn simultaneously.
shadowsocks/conn doesn't follow the thread-safe assumption, this may break some code in future use.
The text was updated successfully, but these errors were encountered: