With this PR we handle new-initiator and new-responder after a peer handshake properly (somewhat). Resolves #114.
An initiator now simply drops new responders when it has already completed the handshake with another responder.
A responder now closes the connection when a new initiator connects after it has already completed a handshake with a previous initiator.
Note that this deviates from the intention of the specification to allow for more than one connection towards a responder over the same WebSocket connection. But resolving this would be far from trivial.
Also makes use of console logging groups and thereby significantly improves readability. What the heck, we found a use case! :tada:
With this PR we handle
new-initiator
andnew-responder
after a peer handshake properly (somewhat). Resolves #114.An initiator now simply drops new responders when it has already completed the handshake with another responder.
A responder now closes the connection when a new initiator connects after it has already completed a handshake with a previous initiator.
Note that this deviates from the intention of the specification to allow for more than one connection towards a responder over the same WebSocket connection. But resolving this would be far from trivial.
Also makes use of console logging groups and thereby significantly improves readability. What the heck, we found a use case! :tada: