aboutsummaryrefslogtreecommitdiff
path: root/RemoteDaemon/Transport/Ssh.hs
diff options
context:
space:
mode:
Diffstat (limited to 'RemoteDaemon/Transport/Ssh.hs')
-rw-r--r--RemoteDaemon/Transport/Ssh.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/RemoteDaemon/Transport/Ssh.hs b/RemoteDaemon/Transport/Ssh.hs
index afedf559e..6315ede85 100644
--- a/RemoteDaemon/Transport/Ssh.hs
+++ b/RemoteDaemon/Transport/Ssh.hs
@@ -18,7 +18,7 @@ import qualified Git
import Git.Command
import Utility.ThreadScheduler
-import Control.Concurrent.Chan
+import Control.Concurrent.STM
import Control.Concurrent.Async
transport :: Transport
@@ -58,7 +58,7 @@ transport' r url transporthandle ichan ochan = do
return $ either (either id id) id status
- send msg = writeChan ochan msg
+ send msg = atomically $ writeTChan ochan msg
fetch = do
send (SYNCING url)
@@ -80,7 +80,7 @@ transport' r url transporthandle ichan ochan = do
Nothing -> return Stopping
handlecontrol = do
- msg <- readChan ichan
+ msg <- atomically $ readTChan ichan
case msg of
STOP -> return Stopping
LOSTNET -> return Stopping