Throw an error when a connection ends with a RST,ACK packet?
See original GitHub issueAccording to MySQL docs, COM_QUIT
command should end with “either a connection close or a OK_Packet”.
As @elemount pointed out in issue #1730, Azure MySQL is answering with an RST,ACK
.
It can be reproduced when you run this example code against an Azure MySQL instance.
var mysql = require('mysql');
var connection = mysql.createConnection({ config });
connection.connect();
connection.query('SELECT 1 + 1 AS solution', function (error, results, fields) {
if (error) throw error;
console.log('The solution is: ', results[0].solution);
});
connection.end();
Throws ECONNRESET error.
Should this library throw an error when a connection end with a RST
with the ACK
flag set?
Can we detect this?
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (10 by maintainers)
Top Results From Across the Web
Raise exception when TCP connection broken - Stack Overflow
Being at end of file is not intrinsically an error, nor is it normally understood to mean a "broken" connection like your title...
Read more >Error handling in R with tryCatchLog: Catching, logging, post ...
The call stack ends basically with the tryCatch call but does not show you the code line in f() where the error was...
Read more >'Connection not found' error thrown at end of task, after the ...
I'm fairly new to VS and SSIS. I have created several SSIS packages, basically a package for retrieving data and creating a csv...
Read more >Continuous RST, ACK flags from the same source - Server Fault
The connection is actively aborted by the server by means of an RST packet, and that packet is arriving almost immediately, much quicker...
Read more >How to Throw Exceptions (The Java™ Tutorials > Essential ...
Any code can throw an exception: your code, code from a package written by ... The method removes the top element from the...
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 Free
Top 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
@alex030293 provided a connection to a MySQL Azure instance and I reproduced the issue and have a tentative fix. I should land the fix on
master
today once I get it cleaned up.I have a failing branch pushed up right now. Still need to get Azure set up and finish the changes. This is what is holding the next release, so yes it is expected in the next release.