HassoPlattnerInstituteHCI / dualpantoframework

DualPanto Framework
7 stars 0 forks source link

Reset connection state for messages that arrive before the first ack #326

Closed corinnaj closed 2 years ago

corinnaj commented 4 years ago

This should fix the problem when we cannot connect after sending i.e. "createObstacle" or "sendMotor" too early. Messages will still not be queued on the device to be processed after a connection is achieved, clients should thus poll until a connection is established (after the first syn ack is sent) before sending data of their own.

JuliusCosmoRomeo commented 3 years ago

Hey @corinnaj, do you know if this fix did actually work?

corinnaj commented 3 years ago

This was one of the bugs we found when we realised why we had to wait for a while before sending some messages. Part of the problem was that iirc the state was not reset correctly, meaning it would wait for a timeout if the first message was not a heartbeat but a data message. I think it might be worth merging this, even though we also fixed the problem on Unitys side. Maybe a quick test on Mac would make sense first