<div dir="ltr"><div>Undertow websockets mantain a peer connections set per WebSocketProtocolHandshakeHandler instance. From the looks of it, it&#39;s there only for undertow users convinience.</div><div><br></div>The application I&#39;m building doesn&#39;t make use of the peer connections set at all and it feels kinda bad to have to pay for the feature despite not using it.<div><br></div><div>It would be great if there was a way to disable this functionality. Perhaps with an overload of the WebSocketProtocolHandshakeHandler constructor that initializes that set to null. (and adding null checks whenever the set is used.)</div><div>Or maybe some global undertow setting?</div><div><br></div><div>This kind of functionality could be provided optionally as a convinience abstract class that implements WebSocketConnectionCallback and maintains the set, exposing it to the users by an overrideable overload of the onConnect method.</div><div>Users that want the functionality could inherit from it.</div><div><br></div></div>