Error when reconnecting to server & Attempting to send messages
See original GitHub issueWe’ve encountered a conditional bug where the NATS client will attempt to send messages, despite no longer being connected to the server. In the code it’s not checking to see if the socket is still attached or not and casuses an error. The side affect appears to prevent the application from completing a reconnect as well. Once completely restarted it can once again reconnect to the server.
You can see our code usage here: https://github.com/nodecraft/appframe-nats.js
[14:34:40] [LOG]: [NATS] Lost connection from server. Reconnecting... at appframe._log (~/node_modules/appframe/appframe.js:882:15)
[14:34:40] [ERROR]: Cannot read property 'resume' of null
TypeError: Cannot read property 'resume' of null
at Client.processInbound (~/node_modules/nats/lib/nats.js:761:16)
at Socket.<anonymous> (~/node_modules/nats/lib/nats.js:468:12)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:547:20) at appframe.debug (~/node_modules/appframe/appframe.js:864:15)
Issue Analytics
- State:
- Created 6 years ago
- Comments:29 (15 by maintainers)
Top Results From Across the Web
Fix problems sending, receiving or connecting to Messages
If you get a notification that your computer can't connect to Messages, try these steps: On your phone, turn your Wi-Fi off and...
Read more >Unable to send email - Error with connecting server
The possible reasons are: the server is down/offline, the port number is incorrect (the server is not listening on that port), or a...
Read more >"Cannot connect the computer to the server" error message ...
Cannot connect the computer to the server because either another software installation is in progress or, the computer has a restart pending.
Read more >Unable Send Email due to errors 'Cannot connect to SMTP ...
Solution. The 4.4. 1 SMTP Status appears when no answer is received from the host or when the connection is lost. This could...
Read more >RTC Connecting Discord – How to Fix the Server Error
But sometimes, when you're trying to establish a voice call connection, you'll get an error that says “RTC Connecting Discord”. This message ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t want minecraft severs to fail. 😃
Ah, perfect. Thanks @aricart! 😄