File tree 2 files changed +23
-0
lines changed
2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ you spot any mistakes.
9
9
* Add new Amazon RDS ca-central-1 certificate CA to Amazon RDS SSL profile #1809
10
10
* Add ` mysql.raw() ` to generate pre-escaped values #877 #1821
11
11
* Fix "changedRows" to work on non-English servers #1819
12
+ * Fix error when server sends RST on ` QUIT ` #1811
12
13
* Fix typo in insecure auth error message
13
14
* Support ` mysql_native_password ` auth switch request for Azure #1396 #1729 #1730
14
15
* Update ` sqlstring ` to 2.3.0
Original file line number Diff line number Diff line change @@ -11,8 +11,30 @@ function Quit(options, callback) {
11
11
}
12
12
13
13
Sequence . call ( this , options , callback ) ;
14
+
15
+ this . _started = false ;
14
16
}
15
17
18
+ Quit . prototype . end = function end ( err ) {
19
+ if ( this . _ended ) {
20
+ return ;
21
+ }
22
+
23
+ if ( ! this . _started ) {
24
+ Sequence . prototype . end . call ( this , err ) ;
25
+ return ;
26
+ }
27
+
28
+ if ( err && err . code === 'ECONNRESET' && err . syscall === 'read' ) {
29
+ // Ignore read errors after packet sent
30
+ Sequence . prototype . end . call ( this ) ;
31
+ return ;
32
+ }
33
+
34
+ Sequence . prototype . end . call ( this , err ) ;
35
+ } ;
36
+
16
37
Quit . prototype . start = function ( ) {
38
+ this . _started = true ;
17
39
this . emit ( 'packet' , new Packets . ComQuitPacket ( ) ) ;
18
40
} ;
You can’t perform that action at this time.
0 commit comments