diff --git a/app/Main.hs b/app/Main.hs
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -49,7 +49,7 @@
   M.onLog m $ const putStrLn
   M.onConnect m $ \c -> do
            print c
-           M.subscribe m 0 "#"
+--           M.subscribe m 0 "#"
 
   M.onDisconnect m print
   M.onSubscribe m $ curry print
@@ -57,7 +57,7 @@
   M.connect m server port keepAlive
 
   forkIO $ forever $ do
-    M.publish m False 0 "hello" "bla"
+    -- M.publish m False 0 "hello" "bla"
     threadDelay 5000000
 
   M.loopForever m
diff --git a/c-mosquitto.cabal b/c-mosquitto.cabal
--- a/c-mosquitto.cabal
+++ b/c-mosquitto.cabal
@@ -1,5 +1,5 @@
 name:                c-mosquitto
-version:             0.1.5.0
+version:             0.1.6.0
 synopsis:            Simpe mosquito MQTT binding able to work with the Amazons IoT
 description:         Simpe mosquito MQTT binding
                      able to work with the Amazons IoT but it should work with other providers
@@ -8,7 +8,7 @@
 license-file:        LICENSE
 author:              Marcin Tolysz
 maintainer:          tolysz@gmail.com
-copyright:           2017(c) Marcin Tolysz
+copyright:           2017-9(c) Marcin Tolysz
 category:            Library
 build-type:          Simple
 extra-source-files:  README.md
diff --git a/src/Network/Mosquitto.hs b/src/Network/Mosquitto.hs
--- a/src/Network/Mosquitto.hs
+++ b/src/Network/Mosquitto.hs
@@ -156,6 +156,13 @@
                                 )
              }|]
 
+disconnect :: Mosquitto a -> IO Int
+disconnect mosq =
+  fmap fromIntegral <$> withPtr mosq $ \pMosq ->
+       [C.exp|int{
+               mosquitto_disconnect( $(struct mosquitto *pMosq) )
+             }|]
+
 onSubscribe :: Mosquitto a -> OnSubscribe -> IO ()
 onSubscribe mosq onSubscribe =  do
   on_subscribe <- mkCOnSubscribe $ \_ _ mid (fromIntegral -> ii) iis ->
