diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-01-15 15:37:48 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-01-15 15:37:53 -0400 |
commit | d80aa496961438584c6eb9e5330eb6beba46ec04 (patch) | |
tree | 9af03d8c0c7041088626d87da3d42513c5d7ad5d /RemoteDaemon/Types.hs | |
parent | f4d7cae1f7254b34f1ca7f3fcf3696b0b4948957 (diff) |
remotedaemon: Fix problem that could prevent ssh connections being made after two LOSTNET messages were received in a row
Perhaps due to two different network interfaces being brought down.
Since there is no reliable way to drain a Chan, I switched to STM TChan.
Diffstat (limited to 'RemoteDaemon/Types.hs')
-rw-r--r-- | RemoteDaemon/Types.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/RemoteDaemon/Types.hs b/RemoteDaemon/Types.hs index 7413f5851..bdc94d949 100644 --- a/RemoteDaemon/Types.hs +++ b/RemoteDaemon/Types.hs @@ -17,6 +17,7 @@ import qualified Utility.SimpleProtocol as Proto import Network.URI import Control.Concurrent +import Control.Concurrent.STM -- The URI of a remote is used to uniquely identify it (names change..) newtype RemoteURI = RemoteURI URI @@ -24,7 +25,7 @@ newtype RemoteURI = RemoteURI URI -- A Transport for a particular git remote consumes some messages -- from a Chan, and emits others to another Chan. -type Transport = RemoteRepo -> RemoteURI -> TransportHandle -> Chan Consumed -> Chan Emitted -> IO () +type Transport = RemoteRepo -> RemoteURI -> TransportHandle -> TChan Consumed -> TChan Emitted -> IO () type RemoteRepo = Git.Repo type LocalRepo = Git.Repo |