aboutsummaryrefslogtreecommitdiff
path: root/P2P/Protocol.hs
diff options
context:
space:
mode:
Diffstat (limited to 'P2P/Protocol.hs')
-rw-r--r--P2P/Protocol.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/P2P/Protocol.hs b/P2P/Protocol.hs
index c3c362f37..135409e26 100644
--- a/P2P/Protocol.hs
+++ b/P2P/Protocol.hs
@@ -387,7 +387,10 @@ serveAuthed myuuid = void $ serverLoop handler
return ServerContinue
handler (CONNECT service) = do
net $ relayService service
- return ServerContinue
+ -- After connecting to git, there may be unconsumed data
+ -- from the git processes hanging around (even if they
+ -- exited successfully), so stop serving this connection.
+ return $ ServerGot ()
handler NOTIFYCHANGE = do
refs <- local waitRefChange
net $ sendMessage (CHANGED refs)