summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2018-10-31 15:04:44 +0300
committerdefanor <defanor@uberspace.net>2018-10-31 15:04:44 +0300
commit154d8538e844bc21af04bdc5110097ceda21d615 (patch)
tree3c1b6985366769cd747ed9bc0cec3721c5f4e84f
parent8c190403b80a3e7d255b5c403dbf4a3e7e96db0c (diff)
use waitAnyCatchCancel
Would be better to prevent the exceptions, but likely it'd be pretty verbose and awkward with libev bindings or similar approaches.
-rw-r--r--DWProxy.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/DWProxy.hs b/DWProxy.hs
index 8db5a19..b177376 100644
--- a/DWProxy.hs
+++ b/DWProxy.hs
@@ -13,7 +13,7 @@ import System.Environment (getArgs)
import System.FilePath ((</>))
import Network.Socket.ByteString (sendAll, recv)
import Network.Socket hiding (send, recv)
-import Control.Concurrent.Async (async, waitAnyCancel)
+import Control.Concurrent.Async (async, waitAnyCatchCancel)
import Control.Exception as E
import Control.Monad (when, forM_, forever)
import Data.Attoparsec.ByteString
@@ -288,6 +288,6 @@ main = do
let c = Config client server db mv pf
c2s' <- async $ c2s c ""
s2c' <- async $ s2c c ""
- waitAnyCancel [c2s', s2c']
+ waitAnyCatchCancel [c2s', s2c']
_ -> putStrLn "Usage: dwroute <quow plugins>"
pure ()