From a54f764761a053958d7f171f8debe64341f09349 Mon Sep 17 00:00:00 2001 From: philopon Date: Wed, 27 Aug 2014 05:51:30 +0900 Subject: [PATCH] fix close function of connection pool. --- src/Database/Memcached/Binary/Internal.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Database/Memcached/Binary/Internal.hs b/src/Database/Memcached/Binary/Internal.hs index 4741e31..e0c34ba 100644 --- a/src/Database/Memcached/Binary/Internal.hs +++ b/src/Database/Memcached/Binary/Internal.hs @@ -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