Skip to content
Snippets Groups Projects
Commit 10244160 authored by Stephen R. van den Berg's avatar Stephen R. van den Berg
Browse files

pgsql: Shortcut to close descriptors when in a destructed object.

parent 0983ca7c
Branches
Tags
No related merge requests found
......@@ -1179,8 +1179,11 @@ private void procmessage() {
}
break;
}
if(!this) { // Already destructed
ci->close(); // So close descriptors only
return;
}
PD("Closing database processloop %O\n",err);
if(this)
_delayederror=err;
for(;objectp(portal);portal=qportals->read())
if(objectp(portal)) {
......@@ -1191,9 +1194,9 @@ private void procmessage() {
}
if(!ci->close() && !terminating && _options.reconnect)
_connectfail();
else if(this)
else
destruct(waitforauthready);
if(this && err && !stringp(err))
if(err && !stringp(err))
throw(err);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment