tedious
tedious copied to clipboard
CONNECTION.CLOSE()
what is the proper way to close connection connection.close(); when the reload the api again the connection.connect() will throw an exception saying request can be made only in logged in state not in
ConnectionError: .connect
can not be called on a Connection in Final
state.
Do you have a repro case we can see? This might be due to connection.close() happening in an async manner. You can try to capture the connection.on('end') event before proceding to open a new connection