question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

client reset observe failed

See original GitHub issue

in client side, i want to send RST packet to server.

req.on('response', function(res) {
  console.log("---------------------response---------------------");
  console.log(res.headers);

  var rcvCount = 5;
  res.on('data', function(data) {
    console.log(data);
    rcvCount--
    if(rcvCount == 0){
      //it will throw new Error: Empty messages must be empty
      req.reset();
    }
  });
})
req.end()

when i call req.reset(), it will throw Empty messages must be empty error

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

1reaction
Pluuutocommented, Nov 8, 2017

I have almost the same problem. When I am using “res.reset()” at server-end.

const coap = require('coap')

const server = coap.createServer()

server.on('request', (req, res) => {
  console.log(`Receive request: ${req.url}`)
  res.reset()
})

server.listen(5683, '127.0.0.1')

It will cause client-end throwing “Empty messages must be empty error”. Using wireshark to capture and I find server-end sending NON msg with ‘5.00 Internal Server Error’ and body ‘Empty messages must be empty’ after send RST msg.

image

NON msg has the same token with the NON request which client-end sent. I think this cause client-end throws error. I don’t know why coap source code deal with reset on this way, maybe it’s a bug? (reference to ‘fastseries’ lib)

0reactions
JKRhbcommented, Jun 16, 2021

@robertbbb @lucarv Could you give a bit more context under which conditions the error occured? (Sorry for the late follow-up question.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to handle client reset error in SwiftUI Realm app #7881
Getting a client reset error in our app, need to remove the local realm and re-open anew automatically for the user when the...
Read more >
How to simulate client reset request? - Atlas Device Sync
Our documentation shows an example on how to handle this request while the app is running and what to do if the client...
Read more >
DOTW: TCP Resets from Client and Server aka TCP-RST ...
A TCP RST (reset) is an immediate close of a TCP connection. This allows for the resources that were allocated for the previous...
Read more >
TCP/IP connectivity issues troubleshooting - Windows Client
TCP reset is an abrupt closure of the session; it causes the resources allocated to the connection to be immediately released and all...
Read more >
Spring web flux WebClient : Connection rest by peers,#block ...
Error has been observed at the following site - Stack Overflow ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found