diff --git a/mighttpd2.cabal b/mighttpd2.cabal
--- a/mighttpd2.cabal
+++ b/mighttpd2.cabal
@@ -1,5 +1,5 @@
 Name:                   mighttpd2
-Version:                3.2.1
+Version:                3.2.2
 Author:                 Kazu Yamamoto <kazu@iij.ad.jp>
 Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp>
 License:                BSD3
@@ -67,6 +67,7 @@
   GHC-Options:          -Wall -threaded -rtsopts
   if flag(tls)
     Cpp-Options:        -DTLS
+    Build-Depends:      async
   Build-Depends:        base >= 4.0 && < 5
                       , bytestring
                       , directory
diff --git a/src/Mighty.hs b/src/Mighty.hs
--- a/src/Mighty.hs
+++ b/src/Mighty.hs
@@ -2,7 +2,9 @@
 
 module Main where
 
+#ifndef TLS
 import Control.Monad (when)
+#endif
 import Data.Version (showVersion)
 import Network.Wai.Application.Classic hiding ((</>), (+++))
 import System.Directory (getCurrentDirectory)
diff --git a/src/Server.hs b/src/Server.hs
--- a/src/Server.hs
+++ b/src/Server.hs
@@ -21,6 +21,7 @@
 #ifdef TLS
 import Control.Concurrent.Async (concurrently)
 import Network.Wai.Handler.WarpTLS
+import Control.Monad (void)
 #endif
 
 import Program.Mighty
@@ -133,7 +134,7 @@
     HttpOnly s  -> runSettingsSocket setting s app
 #ifdef TLS
     HttpsOnly s -> runTLSSocket tlsSetting setting s app
-    HttpAndHttps s1 s2 -> concurrently
+    HttpAndHttps s1 s2 -> void $ concurrently
         (runSettingsSocket setting s1 app)
         (runTLSSocket tlsSetting setting s2 app)
 #else
