aicis/fresco

Network ends in infinite loop if no message is received

jot2re opened this issue · 1 comments

Currently the functionality of SockerNetwork.receive is to to continue in an infinite loop if nothing is received. There should be a timeout. This will help in debugging when running interactive applications, as it is otherwise hard to figure out which thread stalls and where.

But be aware that the timeout should probably not be too small, since it will be the maximum time that can pass between starting different servers in a real execution.
I think the best compromise is actually to make the SocketNetwork time out relatively fast and instead have a loop in actual applications that handles such timeouts gracefully. But this require finding the current places in the code that allows running decentralised applications.