-
Notifications
You must be signed in to change notification settings - Fork 9
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
Socket Connection Close on timeout #17
Comments
Could you make a PR with the fix so I can review the code and make a release? If you can't I'll let you know when I will fix it. |
In another note, if you're using the server, it is supposed to be hanging. A server should always listen requests, if one of them throws an error the server should return the error without breaking down. |
@luk3skyw4lker Hi i open a PR to thyis bugfix, and add typescript typing too |
Solved by #21 |
hi, when there is error like invalid url or port and timeout occurs, my terminal keeps engaged because of socket listener, you should use this.socket.close(); in SetTimeout function I think, can you please check and fix
const timer = setTimeout(() => { const error = new Error( "NTP request timed out, server didn't answered" ); this.socket.close(); return reject(error); }, timeout);
The text was updated successfully, but these errors were encountered: