nl_tokens: The libraries don t support any close function so we need this to emulate it .
pl_tokens: function timeoutCb ( ) { if ( ! received ) { self . emit ( 'error' , { type : 'socket: timeout' , <mask> : 'Connection problem: No response' } ) ; } // Websockets Node module doen't support any close function, we're using the client // https://github.com/Worlize/WebSocket-Node/blob/master/lib/WebSocketClient.js // So we need this var to "emulate" it and avoid returning multiple errors wsError = true ; // We're closing the socket manually, so we need this to avoid errors self . close ( ) ; }