Add close event for mysql socket

This commit is contained in:
welefen 2016-08-16 11:51:38 +08:00
parent 9237fd8364
commit 9da14bc69e

View File

@ -93,6 +93,9 @@ export default class extends Base {
this.connection.on('error', () => {
this.close();
});
this.connection.on('close', () => {
this.close();
});
//PROTOCOL_CONNECTION_LOST
this.connection.on('end', () => {
this.connection = null;