mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-16 11:39:57 +00:00
[relay] Handle QUIC connections concurrently to prevent handshake head-of-line blocking (#6784)
This commit is contained in:
@@ -51,7 +51,10 @@ func (l *Listener) Listen(acceptFn func(conn relaylistener.Conn)) error {
|
||||
|
||||
log.Infof("QUIC client connected from: %s", session.RemoteAddr())
|
||||
conn := NewConn(session)
|
||||
acceptFn(conn)
|
||||
// Run the accept handler (which performs the pre-auth handshake) in its
|
||||
// own goroutine so a slow or stalled handshake cannot block accepting
|
||||
// further connections.
|
||||
go acceptFn(conn)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user