diff options
author | defanor <defanor@uberspace.net> | 2018-10-30 12:27:19 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2018-10-30 12:27:19 +0300 |
commit | 8c190403b80a3e7d255b5c403dbf4a3e7e96db0c (patch) | |
tree | 7f3fd874f29c9bce0fd8cbad74cdf396a37b92a2 | |
parent | ee17437e68b6c02c27fcc9d58405d11ee0e8837b (diff) |
Use waitAnyCancel instead of waitAny
Still awkward, but closer to a proper implementation.
-rw-r--r-- | DWProxy.hs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 () |