diff --git a/src/Network/WebSockets/Monad.hs b/src/Network/WebSockets/Monad.hs
--- a/src/Network/WebSockets/Monad.hs
+++ b/src/Network/WebSockets/Monad.hs
@@ -205,7 +205,7 @@
 -- connection is closed.
 sendSink :: Sink p -> Message p -> IO ()
 sendSink sink msg = modifyMVar_ (unSink sink) $ \iter -> do
-    step <- E.runIteratee $ singleton msg $$ iter
+    step <- E.runIteratee $ E.catchError (singleton msg $$ iter) throw
     return $ E.returnI step
 
 -- | In case the user of the library wants to do asynchronous sending to the
diff --git a/src/Network/WebSockets/Util/PubSub.hs b/src/Network/WebSockets/Util/PubSub.hs
--- a/src/Network/WebSockets/Util/PubSub.hs
+++ b/src/Network/WebSockets/Util/PubSub.hs
@@ -10,7 +10,7 @@
 --
 -- * Push new updates from the server using the 'publish' call
 --
-{-# LANGUAGE Rank2Types #-}
+{-# LANGUAGE Rank2Types, ScopedTypeVariables #-}
 module Network.WebSockets.Util.PubSub
     ( PubSub
     , newPubSub
@@ -19,9 +19,11 @@
     ) where
 
 import Control.Applicative ((<$>))
-import Control.Monad (forM_, forever)
+import Control.Exception (IOException, handle)
+import Control.Monad (foldM, forever)
 import Control.Monad.Trans (liftIO)
 import Data.IntMap (IntMap)
+import Data.List (foldl')
 import qualified Control.Concurrent.MVar as MV
 
 import qualified Data.IntMap as IM
@@ -52,9 +54,17 @@
 
 -- | Broadcast a message to all connected clients
 publish :: PubSub p -> Message p -> IO ()
-publish (PubSub mvar) msg = do
-    sinks <- pubSubSinks <$> MV.readMVar mvar 
-    forM_ (IM.toList sinks) $ \(_, s) -> sendSink s msg
+publish (PubSub mvar) msg = MV.modifyMVar_ mvar $ \pubSub -> do
+    -- Take care to detect and remove broken clients
+    broken <- foldM publish' [] (IM.toList $ pubSubSinks pubSub)
+    return $ foldl' (\p b -> removeClient b p) pubSub broken
+  where
+    -- Publish the message to a single client, add it to the broken list if an
+    -- IOException occurs
+    publish' broken (i, s) =
+        handle (\(_ :: IOException) -> return (i : broken)) $ do
+            sendSink s msg
+            return broken
 
 -- | Blocks forever
 subscribe :: Protocol p => PubSub p -> WebSockets p ()
diff --git a/websockets.cabal b/websockets.cabal
--- a/websockets.cabal
+++ b/websockets.cabal
@@ -1,5 +1,5 @@
 Name:    websockets
-Version: 0.5.2.0
+Version: 0.5.2.1
 
 Synopsis:
   A sensible and clean way to write WebSocket-capable servers in Haskell.
