Commit Diff


commit - 6b1189b300b2ffc6054060b4265205b4245273fd
commit + e3a58bcee71e645118a7597a1b943b33c9024613
blob - 553e9cd0bddfa016637e9ced37dd844a159ec1e0
blob + 4deb48b2af49dc431e3f93e60968ddbebde3c6f5
--- dulwich/protocol.py
+++ dulwich/protocol.py
@@ -238,6 +238,8 @@ class Protocol(object):
             if self.report_activity:
                 self.report_activity(size, "read")
             pkt_contents = read(size - 4)
+        except ConnectionResetError:
+            raise HangupException()
         except socket.error as e:
             raise GitProtocolError(e)
         else: