Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nbb's nREPL crashes if we disconnect without waiting for all output #335

Open
mauricioszabo opened this issue Aug 1, 2023 · 0 comments
Open

Comments

@mauricioszabo
Copy link
Contributor

version
nbb v1.2.175

platform
Linux, Node 16 or 18

problem
If we connect to nREPL, send an "eval" command and don't wait for the result (or for the "done" status) and immediately disconnect, nbb will crash:

node:events:505
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
Emitted 'error' event on Socket instance at:
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -104,
  code: 'ECONNRESET',
  syscall: 'read'
}

repro

  1. Connect to nbb's nREPL
  2. Send an eval command
  3. Disconnect before the result comes

expected behavior
nbb should not crash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant