watchdog-callback
npm install watchdog-callback --save
I use it for socket.io
. In the example below the callback may never be called:
{ if err return console; // have fun with data } socket;
To make sure it will, use the watchdog:
var wdc = ; { if tout return console; if err return console; // have fun with data } socket;
The default timeout is 5000 milliseconds. You can change it:
socket; // 1 second timeout