mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-11-30 21:58:39 +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:
@@ -95,7 +95,7 @@ type ServerWorker struct {
|
||||
func NewServerWorker(ctx context.Context, d routing.Dispatcher, link *transport.Link) (*ServerWorker, error) {
|
||||
worker := &ServerWorker{
|
||||
dispatcher: d,
|
||||
link: link,
|
||||
link: &transport.Link{Reader: link.Reader, Writer: &MutexWriter{Writer: link.Writer}},
|
||||
sessionManager: NewSessionManager(),
|
||||
done: done.New(),
|
||||
timer: time.NewTicker(60 * time.Second),
|
||||
|
||||
Reference in New Issue
Block a user