saltyrtc / saltyrtc-client-java

SaltyRTC Java implementation.
Apache License 2.0
3 stars 4 forks source link

Fix protocol errors triggered by new clients after task state #101

Closed lgrahl closed 5 years ago

lgrahl commented 5 years ago

With this PR we handle new-initiator and new-responder after a peer handshake properly (somewhat). Resolves #102.

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 resolves #103.