-
Notifications
You must be signed in to change notification settings - Fork 87
Error callback calls twice if host is inaccessible #106
Copy link
Copy link
Open
Description
Hi,
if server is not available error callback will be called twice: first time after TIMEOUT and second time later. I return response to user in error callback, so in this case response will be returned twice.
Script example: http://pastebin.com/X1d8j0S9
Run and open in browser http://localhost:8888/ :
user@localhost ~ $ node es.js
Listen...
ERROR [Error: timed out after 5000ms] <-- timeout is 5s
ERROR { [Error: connect ETIMEDOUT] code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect' } <-- ~30s later when socket was closed (?)I tried abort the request before emitting timeout error (elasticSearchCall.js:50), but second error still raised.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels