我的代码是这个(大约是这样):
this.con = mysql.createConnection({...});
this.con.connect(); // No error
this.con.destroy();
.......
.......
this.con.connect(); // error: Cannot enqueue Handshake after being destroyed.
答案 0 :(得分:0)
尝试重新创建/重新分配连接,然后再重新连接:
this.con = mysql.createConnection({...});