summaryrefslogtreecommitdiff
path: root/RemoteDaemon/Types.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-04-12 16:32:59 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-04-12 16:32:59 -0400
commit0f1ea37a68535b95c56e1e142ecc8db1ac6b43dc (patch)
tree5527c4de0f0a561afe5e358b7b2e8f491d29146d /RemoteDaemon/Types.hs
parent102e182eac9b95e31fb71830fe5ce5a502e93d92 (diff)
remotedaemon: When network connection is lost, close all cached ssh connections.
This commit was sponsored by Cedric Staub.
Diffstat (limited to 'RemoteDaemon/Types.hs')
-rw-r--r--RemoteDaemon/Types.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/RemoteDaemon/Types.hs b/RemoteDaemon/Types.hs
index eef7389cc..aff910120 100644
--- a/RemoteDaemon/Types.hs
+++ b/RemoteDaemon/Types.hs
@@ -42,6 +42,7 @@ data Emitted
-- Messages that the deamon consumes.
data Consumed
= PAUSE
+ | LOSTNET
| RESUME
| CHANGED RefList
| RELOAD
@@ -63,6 +64,7 @@ instance Proto.Sendable Emitted where
instance Proto.Sendable Consumed where
formatMessage PAUSE = ["PAUSE"]
+ formatMessage LOSTNET = ["LOSTNET"]
formatMessage RESUME = ["RESUME"]
formatMessage (CHANGED refs) =["CHANGED", Proto.serialize refs]
formatMessage RELOAD = ["RELOAD"]
@@ -78,6 +80,7 @@ instance Proto.Receivable Emitted where
instance Proto.Receivable Consumed where
parseCommand "PAUSE" = Proto.parse0 PAUSE
+ parseCommand "LOSTNET" = Proto.parse0 LOSTNET
parseCommand "RESUME" = Proto.parse0 RESUME
parseCommand "CHANGED" = Proto.parse1 CHANGED
parseCommand "RELOAD" = Proto.parse0 RELOAD