diff --git a/scalable-server.cabal b/scalable-server.cabal
--- a/scalable-server.cabal
+++ b/scalable-server.cabal
@@ -3,7 +3,7 @@
 Synopsis:            Library for writing fast/scalable TCP-based services
 Description:         Library for writing fast/scalable TCP-based services
 
-Version:             0.2.0
+Version:             0.2.1
 
 License:             BSD3
 
@@ -39,4 +39,5 @@
                  blaze-builder>=0.3 && <0.4,
                  BoundedChan >=1.0 && < 1.1
 
+  Extensions:    ScopedTypeVariables
   ghc-options:   -O2
diff --git a/src/Network/Server/ScalableServer.hs b/src/Network/Server/ScalableServer.hs
--- a/src/Network/Server/ScalableServer.hs
+++ b/src/Network/Server/ScalableServer.hs
@@ -10,7 +10,7 @@
 import Network.Socket.Enumerator (enumSocket)
 import qualified Network.Socket.ByteString as BinSock
 import Network.BSD
-import Control.Exception (finally)
+import Control.Exception (finally, try, throwIO, SomeException)
 import Control.Monad (forever, liftM, replicateM, void)
 import Control.Monad.Trans (liftIO)
 import Control.Concurrent (forkIO, threadDelay)
@@ -107,7 +107,12 @@
     next <- readChan chan
     case next of
         Just a -> do
-            resp <- proc a -- XXX handle exceptions?
-            toByteStringIO (BinSock.sendAll s) $ resp
-            processRequests chan proc s
+            mresp <- try $ proc a
+            case mresp of
+                Right resp -> do
+                    toByteStringIO (BinSock.sendAll s) $ resp
+                    processRequests chan proc s
+                Left (e :: SomeException) -> do
+                    sClose s
+                    throwIO e
         Nothing -> return ()
