mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-12-01 06:08:37 +00:00
VLESS Multiplex (mux.cool): Apply MutexWriter to avoid concurrent writes to the underlayer
https://github.com/XTLS/Xray-core/pull/7337#issuecomment-6692618802 https://github.com/XTLS/Xray-core/pull/7345#issuecomment-6714114884 Fixes https://github.com/XTLS/Xray-core/issues/5845 and https://github.com/XTLS/Xray-core/issues/7336 --------- Co-authored-by: StarProxima <34741787+StarProxima@users.noreply.github.com>
This commit is contained in:
@@ -188,6 +188,7 @@ var (
|
||||
|
||||
// NewClientWorker creates a new mux.Client.
|
||||
func NewClientWorker(stream transport.Link, s ClientStrategy) (*ClientWorker, error) {
|
||||
stream.Writer = &MutexWriter{Writer: stream.Writer}
|
||||
c := &ClientWorker{
|
||||
sessionManager: NewSessionManager(),
|
||||
link: stream,
|
||||
|
||||
Reference in New Issue
Block a user