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

pgsql: Simplify code.

parent a5b0b317
No related branches found
No related tags found
No related merge requests found
......@@ -425,7 +425,6 @@ class conxion {
|SSL.File
#endif
socket;
private int towrite;
final multiset(sql_result) runningportals = (<>);
final MUTEX nostash;
......@@ -496,7 +495,7 @@ class conxion {
private int write_cb() {
Thread.MutexKey lock = shortmux->lock();
if (this) { // Guard against async destructs
towrite -= output_to(socket, towrite);
output_to(socket);
lock = 0;
if (!i->fillread && !sizeof(this))
close();
......@@ -564,10 +563,10 @@ outer:
case SENDOUT:;
}
Thread.MutexKey lock = shortmux->trylock();
if (lock && (towrite = sizeof(this))) {
if (lock && sizeof(this)) {
PD("%d>Sendcmd %O\n",
socket->query_fd(), ((string)this)[..towrite-1]);
towrite -= output_to(socket, towrite);
socket->query_fd(), (string)this);
output_to(socket);
}
} while (0);
started = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment