fresco icon indicating copy to clipboard operation
fresco copied to clipboard

Network ends in infinite loop if no message is received

Open jot2re opened this issue 2 years ago • 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.

jot2re avatar Nov 21 '22 14:11 jot2re

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.

jot2re avatar Nov 21 '22 14:11 jot2re