`maxConns` option is ignored for incoming connections

Author: ferossCreated Mar 29, 2016Updated Jul 17, 2026
Labelshelp wantedbugarea/perf

The maxConns option is currently ignored for incoming connections, so there's effectively no limit the number of incoming connections that we accept.

For TCP, we could just immediately destroy the incoming connection, or perhaps pause the server somehow to avoid accepting in the first place? For WebRTC, we should consider not ever returning an offer when we're at capacity, since doing the whole signaling process is expensive (webrtc conns are a limited resource; and trackers have limited resources)