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

pgsql: Guard against asynchronous destructs.

parent 792569e1
No related branches found
No related tags found
No related merge requests found
...@@ -284,10 +284,12 @@ class conxion { ...@@ -284,10 +284,12 @@ class conxion {
private int write_cb() { private int write_cb() {
Thread.MutexKey lock = shortmux->lock(); Thread.MutexKey lock = shortmux->lock();
if (this) { // Guard against async destructs
towrite -= output_to(socket, towrite); towrite -= output_to(socket, towrite);
lock = 0; lock = 0;
if (!i->fillread && !sizeof(this)) if (!i->fillread && !sizeof(this))
close(); close();
}
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment