Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop when connection is lost... #4

Open
zoranzhao opened this issue Feb 25, 2019 · 0 comments
Open

Infinite loop when connection is lost... #4

zoranzhao opened this issue Feb 25, 2019 · 0 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@zoranzhao
Copy link
Owner

zoranzhao commented Feb 25, 2019

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 zoranzhao self-assigned this Feb 25, 2019
@zoranzhao zoranzhao added the help wanted Extra attention is needed label Feb 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant