瀏覽代碼

Merge pull request #1030 from jelmer/connection-reset-error

Explicitly handle ConnectionResetError
Jelmer Vernooij 2 年之前
父節點
當前提交
e3a58bcee7
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      dulwich/protocol.py

+ 2 - 0
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: