sidorares / sidorares/node-mysql2

exception on client disconnect

Open
#232 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question server
Dominant language
TypeScript
Stars
4.4k
Forks
680
Avg merge
9h 7m
Merged PRs (30d)
59

Description

when implementing a server and the client disconnects I get:

events.js:72
throw er; // Unhandled 'error' event
^
Error: Connection lost: The server closed the connection.
at Socket. (/node_modules/mysql2/lib/connection.js:107:15)
at Socket.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:910:16
at process._tickCallback (node.js:415:13)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the server/client disconnect described in the report and inspect the error path at node_modules/mysql2/lib/connection.js:107, along with Node.js events.js handling of unhandled errors. Determine the expected behavior when the server closes the connection and verify it with a focused regression test or documented reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, nodejs
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.