DeepThings icon indicating copy to clipboard operation
DeepThings copied to clipboard

Infinite loop when connection is lost...

Open zoranzhao opened this issue 5 years ago • 0 comments

In https://github.com/zoranzhao/DeepThings/blob/master/distriot/src/network_util.c file: We have: n = recv(sock, buffer + bytes_read, bytes_length - bytes_read, 0); Note that if the connection is lost, n will be 0 and the read_from_sock will fall into a infinite loop. This needs to be handled properly.

zoranzhao avatar Feb 25 '19 17:02 zoranzhao