openbci-archive/OpenBCI_NodeJS

Socket not closed if connect() called twice

Closed this issue · 0 comments

connect() blindly sets this.connected = false without actually closing the socket if it is open.

Alternatively it might raise an error.

  • one of throw an error, reject the promise, or disconnect the existing connection, for connect() called when already connected.
  • add a test for connect() called a second time without a disconnect()