Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle MySQL servers not closing TCP connection after QUIT -> OK exch…
…ange fixes #1277
- Loading branch information
1 parent
e578e8c
commit 26d3f04
Showing
4 changed files
with
35 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
var assert = require('assert'); | ||
var common = require('../../common'); | ||
var connection = common.createConnection({port: common.fakeServerPort}); | ||
|
||
var server = common.createFakeServer(); | ||
|
||
server.listen(common.fakeServerPort, function (err) { | ||
assert.ifError(err); | ||
|
||
connection.end(function (err) { | ||
assert.ifError(err); | ||
server.destroy(); | ||
}); | ||
}); | ||
|
||
server.on('connection', function (conn) { | ||
conn.handshake(); | ||
conn.on('quit', function () { | ||
conn._sendPacket(new common.Packets.OkPacket()); | ||
conn._parser.resetPacketNumber(); | ||
}); | ||
}); |