fix: handle ping timeout error after client created#136
fix: handle ping timeout error after client created#136jaimepk27 wants to merge 1 commit intokylefarris:masterfrom
Conversation
|
A suggestion to improve ping method. It would be possible to add a config property |
|
Thank you for your contribution! We need to figure out a way to make a working test as part of our test suite before this can be merged in. Give it a go and see if you can get a test written for this scenario. Also, documentation would need to be updated if you want to add a |
Of course, I will try to add a test for timeout errors.
Ok, I will update the docs as well. I was thinking about adding pingTimeout to the init options and then use it as param in _initSocket. |
|
That all sounds great! Looking forward to seeing the feature added! |
Fix for timeout error on ping request using remote server.
Explanation
The timeout error is thrown after the client is created and the promise is neither resolved nor rejected.
To fix this, the ping method should handle the timeout error after the client is created.
Test scenario
First, run a clamav server.
Then, block traffic for clamav server.
And finally, try to connect to clamav server.