Skip to content

Commit 8bc6462

Browse files
committed
Merge pull request #33 from radford/get-connection-race
cond.signal() those in lock().cond.wait()
2 parents e81192a + 5467983 commit 8bc6462

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pool.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ pub struct PooledPostgresConnection {
124124
impl Drop for PooledPostgresConnection {
125125
fn drop(&mut self) {
126126
let conn = unsafe { cast::transmute(self.conn.take_unwrap()) };
127-
self.pool.pool.lock().pool.push(conn);
127+
let mut pool = self.pool.pool.lock();
128+
pool.pool.push(conn);
129+
pool.cond.signal();
128130
}
129131
}
130132

0 commit comments

Comments
 (0)