NodeJS MySQL - How to know connection is release or not
问题 I am developing NodeJS + MySQL web API. I am using mysql npm module. I want know connection is release or not is there any function or variable. Like if(!connection.isRelease() OR !connection.isClose() OR !connection.end()) { connection.release(); } Is there any specific function to know connection is release or not? I am getting error like "connection already release" 回答1: You can check if the connection is in the pool to see if it was released. The index in the free connections will be -1