fix close function of connection pool.

This commit is contained in:
philopon 2014-08-27 05:51:30 +09:00
parent 2edf80c0c5
commit a54f764761

View File

@ -65,7 +65,7 @@ close (Connection mv) = do
h <- swapMVar mv (error "connection already closed")
quit h
hClose h
close _ = return ()
close (ConnectionPool p) = destroyAllResources p
useConnection :: (Handle -> IO a) -> Connection -> IO a
useConnection f (Connection mv) = withMVar mv f