Revision 739
Added by bojilova almost 23 years ago
DBQuery.java | ||
---|---|---|
226 | 226 |
} |
227 | 227 |
|
228 | 228 |
try { |
229 |
if(conn == null) |
|
229 |
if(conn == null || conn.isClosed())
|
|
230 | 230 |
{ |
231 | 231 |
dbconn = util.openDBConnection(); |
232 | 232 |
} |
Also available in: Unified diff
as John were testing Metacat on postgres,
he discovered that Connection needs more precise check
whether it is open because of db timing outs.
So used to be:
if ( conn null ) { get new connection from db; }
Now changed to:
if ( conn null || conn.isClosed() ) { get new connection from db; }
Hope this will solve the problems with errors as:
Connection reset by peer, etc.