sidorares / sidorares/node-mysql2
exception on client disconnect
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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