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

unable to detect when the network connection is closed sometimes #8

Closed
ohnx opened this issue Nov 14, 2018 · 1 comment
Closed

unable to detect when the network connection is closed sometimes #8

ohnx opened this issue Nov 14, 2018 · 1 comment
Labels

Comments

@ohnx
Copy link
Owner

ohnx commented Nov 14, 2018

minervabot seems like it isn't able to detect when the remote server disconnects sometimes.

@ohnx
Copy link
Owner Author

ohnx commented Nov 20, 2018

This can be solved by setting a timeout on the socket:

struct timeval max_wait;
max_wait.tv_sec = 324;
max_wait.tv_usec = 324000;
setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, (char *)& max_wait,sizeof(struct max_wait));

@ohnx ohnx added the bug label Nov 20, 2018
@ohnx ohnx closed this as completed in ebcc02d Nov 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant