pike.git/
lib/
modules/
Sql.pmod/
pgsql_util.pmod
Branch:
Tag:
Non-build tags
All tags
No tags
2019-05-29
2019-05-29 14:59:51 by Stephen R. van den Berg <srb@cuci.nl>
21efd7accbd8fcf94b8f4d9558f15a4aef8f6f1e (
12
lines) (+
7
/-
5
)
[
Show
|
Annotate
]
Branch:
master
pgsql: Eliminate race for db connections still open at program exit.
678:
destruct(result); }; destruct(nostash);
+
if (socket->set_non_blocking)
socket->set_non_blocking(); // Drop all callbacks PD("%d>Close socket\n", socket->query_fd()); socket->close(); // This will be an asynchronous close
1540:
_fetchlimit = pgsqlsess->_fetchlimit; _bindportal(); conxsess bindbuffer = c->start();
-
_unnamedstatementkey = 0;
+
stmtifkey = 0; CHAIN(bindbuffer)->add_int8('B')->add_hstring(plugbuffer, 4, 4); if (!_tprepared && sizeof(_preparedname))
1550:
|| sizeof(_query) >= MINPREPARELENGTH && execfetchlimit->match(_query)) && _fetchlimit, bindbuffer);
+
_unnamedstatementkey = 0;
} } }
1686:
datarowtypes = emptyarray; _ddescribe->broadcast(); }
-
if (delayederror && !pgsqlsess.delayederror)
+
if (delayederror &&
pgsqlsess &&
!pgsqlsess.delayederror)
pgsqlsess.delayederror = delayederror; // Preserve error upstream pgsqlsess = 0; }
1714:
protected void _destruct() { catch { // inside destructors, exceptions don't work
-
_releasesession();
+
_releasesession(
"ABORT"
);
}; }
2745:
showportalstack("THROWN"); #endif if (objectp(portal))
-
portal->_releasesession();
+
portal->_releasesession(
"ERROR"
);
portal = 0; if (!waitforauthready) continue; // Only continue if authentication did not fail