fix: 修复监听 accept 退避与握手前超时上限
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"net"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"git.asio.asia/nixevol/NixMsg/internal/listener"
|
||||
"github.com/coder/websocket"
|
||||
@@ -36,6 +37,7 @@ func (b *Broker) WSHandler(proxies *listener.ProxySet) http.Handler {
|
||||
nc = listener.WithRemoteAddr(nc, &net.TCPAddr{IP: net.ParseIP(ip)})
|
||||
}
|
||||
}
|
||||
_ = nc.SetReadDeadline(time.Now().Add(10 * time.Second))
|
||||
_ = b.AttachWS(nc)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user