You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a connection error occurs, e.g. because of access permissions, the socket is not closed properly and open connections are left on the server. This can be checked by querying the MON$ATTACHMENTS table:
SELECT MON$REMOTE_PROCESS
FROM MON$ATTACHMENTS
WHERE MON$REMOTE_PROCESS='/usr/local/bin/node'
I have modified the code of the attach function to have access from outside the driver to the connection, and I have managed to solve the problem by doing a detach to the db object, which I can access from the connection:
node-firebird:
exports.attach=function(options,callback){varhost=options.host||DEFAULT_HOST;varport=options.port||DEFAULT_PORT;varmanager=options.manager||false;varcnx=this.connection=newConnection(host,port,function(err){
...
},options);returncnx;// Fix: get access to connection object outside node-firebird};
constconn=Firebird.attach(this._config,(err,db)=>{this._conn.push(conn);if(err){// manually detach the connection in case of errorconn.db.detach();
...
I understand that db.detach() should be done automatically in case of error.
The text was updated successfully, but these errors were encountered:
When a connection error occurs, e.g. because of access permissions, the socket is not closed properly and open connections are left on the server. This can be checked by querying the
MON$ATTACHMENTS
table:I have modified the code of the
attach
function to have access from outside the driver to the connection, and I have managed to solve the problem by doing adetach
to thedb
object, which I can access from the connection:node-firebird:
I understand that
db.detach()
should be done automatically in case of error.The text was updated successfully, but these errors were encountered: