diff options
author | Joey Hess <joey@kitenet.net> | 2013-07-08 12:53:08 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-07-08 12:53:08 -0400 |
commit | 1d45af3a60da9465dbc3c187ad8d7546cf9255fc (patch) | |
tree | 50f4415252b36c0bbd85c94042ea5a8bd8f06c73 /Assistant | |
parent | 5168295bc2a585edb5842272ab14fd1f5bd71972 (diff) |
fix build
Diffstat (limited to 'Assistant')
-rw-r--r-- | Assistant/XMPP/Git.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Assistant/XMPP/Git.hs b/Assistant/XMPP/Git.hs index 40c4bcdd3..97b974f82 100644 --- a/Assistant/XMPP/Git.hs +++ b/Assistant/XMPP/Git.hs @@ -363,15 +363,16 @@ withPushMessagesInSequence cid side a = loop 0 loop seqnum = do m <- timeout xmppTimeout <~> waitInbox cid side let go s = a m >> loop s + let next = seqnum + 1 case extractSequence =<< m of Just seqnum' - | seqnum' == seqnum + 1 -> go seqnum' + | seqnum' == next -> go next | seqnum' == 0 -> go seqnum | seqnum' == seqnum -> do debug ["ignoring duplicate sequence number", show seqnum] loop seqnum | otherwise -> do - debug ["ignoring out of order sequence number", show seqnum', "expected", show seqnum + 1] + debug ["ignoring out of order sequence number", show seqnum', "expected", show next] loop seqnum Nothing -> go seqnum |