diff --git a/Changelog.md b/Changelog.md
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,3 +1,12 @@
+## 1.2.0
+
+* Change `appendDisconnectHandler` to work in the `EventHandler` monad. This
+  allows you to broadcast messages to other clients when a socket disconnects.
+  The chat example has been updated to broadcast a "user left" message to
+  demonstrate this.
+
+  Thanks to Kayo Phoenix (@katyo) for the majority of this work!
+
 ## 1.1.1
 
 * Build with `engine-io` 1.2
diff --git a/socket-io.cabal b/socket-io.cabal
--- a/socket-io.cabal
+++ b/socket-io.cabal
@@ -1,5 +1,5 @@
 name: socket-io
-version: 1.1.1
+version: 1.2.0
 homepage: http://github.com/ocharles/engine.io
 license: BSD3
 license-file: LICENSE
diff --git a/src/Network/SocketIO.hs b/src/Network/SocketIO.hs
--- a/src/Network/SocketIO.hs
+++ b/src/Network/SocketIO.hs
@@ -169,7 +169,7 @@
     eioHandler socket = do
       let wrappedSocket = Socket socket eio
       routingTable <- flip runReaderT wrappedSocket $
-        execStateT socketHandler (RoutingTable mempty (const (return ())))
+        execStateT socketHandler (RoutingTable mempty (return ()))
 
       return $ EIO.SocketApp
         { EIO.saApp = flip runReaderT wrappedSocket $ do
@@ -191,7 +191,7 @@
 
                 Left e -> error $ "Attoparsec failed: " ++ show e
 
-        , EIO.saOnDisconnect = rtDisconnect routingTable (socketId wrappedSocket)
+        , EIO.saOnDisconnect = runReaderT (rtDisconnect routingTable) wrappedSocket
         }
 
   return (EIO.handler eio eioHandler api)
@@ -225,7 +225,7 @@
 -- invoke when events are received.
 data RoutingTable = RoutingTable
   { rtEvents :: HashMap.HashMap Text.Text (Aeson.Array -> MaybeT (ReaderT Socket IO) ())
-  , rtDisconnect :: EIO.SocketId -> IO ()
+  , rtDisconnect :: EventHandler ()
   }
 
 
@@ -296,10 +296,10 @@
 -- | Run the given IO action when a client disconnects, along with any other
 -- previously register disconnect handlers.
 appendDisconnectHandler
-  :: MonadState RoutingTable m => (EIO.SocketId -> IO ()) -> m ()
+  :: MonadState RoutingTable m => EventHandler () -> m ()
 appendDisconnectHandler handler = modify $ \rt -> rt
-  { rtDisconnect = \sId -> do rtDisconnect rt sId
-                              handler sId
+  { rtDisconnect = do rtDisconnect rt
+                      handler
   }
 
 --------------------------------------------------------------------------------
