We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f0d2e5 commit aff2330Copy full SHA for aff2330
1 file changed
src/tcp-client-request-handler.ts
@@ -39,6 +39,11 @@ export default class ModbusTCPClientRequestHandler extends MBClientRequestHandle
39
40
this._socket.on('connect', this._onConnect.bind(this))
41
this._socket.on('close', this._onClose.bind(this))
42
+
43
+ // Check if the passed in socket connection is already connected
44
+ if(this._socket.readyState === 'open'){
45
+ this._onConnect()
46
+ }
47
}
48
49
// TODO: Find a better way then putting in the any overide
0 commit comments