summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2018-10-30 12:27:19 +0300
committerdefanor <defanor@uberspace.net>2018-10-30 12:27:19 +0300
commit8c190403b80a3e7d255b5c403dbf4a3e7e96db0c (patch)
tree7f3fd874f29c9bce0fd8cbad74cdf396a37b92a2
parentee17437e68b6c02c27fcc9d58405d11ee0e8837b (diff)
Use waitAnyCancel instead of waitAny
Still awkward, but closer to a proper implementation.
-rw-r--r--DWProxy.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/DWProxy.hs b/DWProxy.hs
index 621fdcf..8db5a19 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, waitAny)
+import Control.Concurrent.Async (async, waitAnyCancel)
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 ""
- waitAny [c2s', s2c']
+ waitAnyCancel [c2s', s2c']
_ -> putStrLn "Usage: dwroute <quow plugins>"
pure ()