californium.scandium
californium.scandium copied to clipboard
Simultaneous requests to the same server overwrites each other's handshaker
In my project I delay the flight 6 (server finished message) from the TinyDTLS constrained server. While, scandium is re-transmitting the flight 5 as it is supposed to do, from upper layer a new request arrives. In sendNext@DTLSConnector, since there is already a session, which is not active, a new ResumingClientHandshaker (RCH) is created. RCH overwrites the existing ClientHandshaker. The rest is disaster.
For the time being, in the sendNext method I simply ignore requests while there is already an ongoing flight. I am not sure what is the true action. May be the problem is the upper layer since it re-sends the request although I use blocking Coap interface as follows:
CoapClient client = new CoapClient(uri);
client.setEndpoint(new CoAPEndpoint(dtlsConnector, NetworkConfig.getStandard()));
client.setTimeout(0);
CoapResponse response = client.get();