aboutsummaryrefslogtreecommitdiff
path: root/Assistant/Pairing.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-11-02 15:10:29 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-11-02 15:10:29 -0400
commit6c84eaf5a01046a0fa175d75e7027f686e00a6ee (patch)
treef17a9dbbe95514ec5b2950b954b2279fb1b4d349 /Assistant/Pairing.hs
parent15b4cd87363a872d0d165fa1c02c48a8cb63cccf (diff)
Improve local pairing behavior when two computers both try to start the pairing process separately.
I was able to reproduce something very like this bug by starting pairing separately on both computers under poor network conditions (ie, weak wifi on my front porch). Neither computer showed an alert for the PairReq messages it was seeing (intermittently) from the other. So, I've made a new PairReq message that has not been seen before always make the alert pop up, even if the assistant thinks it is in the middle of its own pairing process (or even another pairing process with a different box on the LAN). (This shouldn't cause a rogue PairAck to disrupt a pairing process part way through.)
Diffstat (limited to 'Assistant/Pairing.hs')
-rw-r--r--Assistant/Pairing.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Assistant/Pairing.hs b/Assistant/Pairing.hs
index 4736c4396..bb1384a15 100644
--- a/Assistant/Pairing.hs
+++ b/Assistant/Pairing.hs
@@ -28,7 +28,7 @@ data PairStage
| PairAck
{- "I saw your PairAck; you can stop sending them." -}
| PairDone
- deriving (Eq, Read, Show, Ord)
+ deriving (Eq, Read, Show, Ord, Enum)
newtype PairMsg = PairMsg (Verifiable (PairStage, PairData, SomeAddr))
deriving (Eq, Read, Show)