diff --git a/pontarius-xmpp.cabal b/pontarius-xmpp.cabal
--- a/pontarius-xmpp.cabal
+++ b/pontarius-xmpp.cabal
@@ -1,6 +1,6 @@
 Cabal-Version: 2.2
 Name:          pontarius-xmpp
-Version:       0.5.6.7
+Version:       0.5.6.8
 Build-Type:    Simple
 License:       BSD-3-Clause
 License-File:  LICENSE.md
@@ -214,4 +214,4 @@
 Source-Repository this
   Type: git
   Location: https://github.com/l29ah/pontarius-xmpp.git
-  Tag: 0.5.6.7
+  Tag: 0.5.6.8
diff --git a/source/Network/Xmpp/Tls.hs b/source/Network/Xmpp/Tls.hs
--- a/source/Network/Xmpp/Tls.hs
+++ b/source/Network/Xmpp/Tls.hs
@@ -1,4 +1,5 @@
 {-# OPTIONS_HADDOCK hide #-}
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE PackageImports #-}
@@ -193,7 +194,9 @@
 wrapExceptions :: IO a -> IO (Either XmppFailure a)
 wrapExceptions f = Ex.catches (liftM Right $ f)
                  [ Ex.Handler $ return . Left . XmppIOException
+#if !MIN_VERSION_tls(1,8,0)
                  , Ex.Handler $ wrap . XmppTlsError
+#endif
                  , Ex.Handler $ wrap . XmppTlsException
                  , Ex.Handler $ return . Left
                  ]
