Branch: Tag:

2014-12-11

2014-12-11 10:23:48 by Stephen R. van den Berg <srb@cuci.nl>

pgsql: Explicitly dislodge read mutex upon fd close.

333:       final void sendterminate() {    Thread.MutexKey lock=i->fillreadmux->lock(); -  i->fillread.signal(); -  i->fillread=0; // Delayed close() after flushing the output buffer +  if(i->fillread) // Delayed close() after flushing the output buffer +  i->fillread.signal(), i->fillread=0;    lock=0;    }       final int close() { -  +  int ret;    destruct(nostash);    PD("%d>Close socket\n",socket->query_fd()); -  return socket->close(); +  ret=socket->close(); +  sendterminate(); +  return ret;    }       protected void destroy() {