Branch: Tag:

2011-10-03

2011-10-03 14:12:57 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Sql.pgsql: sendterminate() implies close().

close() may not be called on a closed connection.
Thanks to Carl Grubbström <carl@taxisystem.se> for the report.

1028:   { cancelquery();    if(_c)    _c.sendterminate(); +  _c=0;   }      void destroy()
1041:    prepstmtused=0;    if(!force)    _c.sendterminate(); -  _c.close(); _c=0; +  else +  _c.close(); +  _c=0;    foreach(prepareds;;mapping tp)    m_delete(tp,"preparedname");    if(!(connectmtxkey = _stealmutex.trylock(2)))