diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-12-09 17:11:16 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-12-09 17:11:16 -0400 |
commit | 46a86f6d9d60453582bd3e35384ef2f6640ca322 (patch) | |
tree | 04a8be15c0a5295fe9a158a5c7306caeefa78278 /P2P | |
parent | b6cded4bac5efce17c9cce954ca0d1b22b4ee5e7 (diff) |
hang up connection after relaying
Seems that git upload-pack outputs a "ONCDN " that is not read by the
remote git receive-pack. This fixes:
[2016-12-09 17:08:32.77159731] P2P > ERROR protocol parse error: "ONCDN "
Diffstat (limited to 'P2P')
-rw-r--r-- | P2P/Protocol.hs | 5 |
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) |