mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-12-01 06:08:37 +00:00
Revert "VLESS Multiplex (mux.cool): Apply MutexWriter to avoid concurrent writes to the underlayer"
This reverts commit 5745dea2b4.
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package mux
|
||||
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/xtls/xray-core/common"
|
||||
"github.com/xtls/xray-core/common/buf"
|
||||
"github.com/xtls/xray-core/common/net"
|
||||
@@ -11,17 +9,6 @@ import (
|
||||
"github.com/xtls/xray-core/common/session"
|
||||
)
|
||||
|
||||
type MutexWriter struct {
|
||||
sync.Mutex
|
||||
buf.Writer
|
||||
}
|
||||
|
||||
func (w *MutexWriter) WriteMultiBuffer(mb buf.MultiBuffer) error {
|
||||
w.Lock()
|
||||
defer w.Unlock()
|
||||
return w.Writer.WriteMultiBuffer(mb)
|
||||
}
|
||||
|
||||
type Writer struct {
|
||||
dest net.Destination
|
||||
writer buf.Writer
|
||||
|
||||
Reference in New Issue
Block a user