mirror of
https://github.com/thinkjs/thinkjs.git
synced 2026-01-25 14:42:47 +00:00
close socket when has error Connection lost: The server closed the connection.
This commit is contained in:
parent
0225d468a2
commit
4d4596ef3b
@ -124,6 +124,10 @@ export default class extends Base {
|
||||
if(this.pool && connection.release){
|
||||
connection.release();
|
||||
}
|
||||
//Connection lost: The server closed the connection.
|
||||
if(err.code === 'PROTOCOL_CONNECTION_LOST'){
|
||||
this.close();
|
||||
}
|
||||
|
||||
if (this.config.log_sql) {
|
||||
think.log(sql, 'SQL', startTime);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user