rabbit.js icon indicating copy to clipboard operation
rabbit.js copied to clipboard

Connect callback not optional

Open bstst opened this issue 9 years ago • 0 comments

Documentation states socket.connect(address [, connectedCallback]), yet while the sub socket connect callback is indeed optional, the pub socket connect callback is not optional, and if you only do this:

pub.connect('socket')

It will fail with this error:

timers.js:534
    immediate._onImmediate();
              ^

TypeError: immediate._onImmediate is not a function
    at tryOnImmediate (timers.js:534:15)
    at processImmediate [as _immediateCallback] (timers.js:514:5)

Specifying a callback function fixes the issue.

bstst avatar Apr 15 '16 05:04 bstst