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 "
This commit is contained in:
Joey Hess 2016-12-09 17:11:16 -04:00
parent b65780778a
commit fa1b3a19f9
No known key found for this signature in database
GPG key ID: C910D9222512E3C7

View file

@ -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)