Move the offering of a new thread on release from the abandoned connection code to the release code to eliminate the possibility of a blocked thread on release.
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@997321
13f79535-47bb-0310-9956-
ffa450edef68
}
//release the connection
release(con);
- //we've asynchronously reduced the number of connections
- //we could have threads stuck in idle.poll(timeout) that will never be notified
- if (waitcount.get()>0) idle.offer(new PooledConnection(poolProperties,this));
} finally {
con.unlock();
}
} finally {
con.unlock();
}
+ // we've asynchronously reduced the number of connections
+ // we could have threads stuck in idle.poll(timeout) that will never be
+ // notified
+ if (waitcount.get() > 0) {
+ idle.offer(new PooledConnection(poolProperties, this));
+ }
}
/**