فهرست منبع

Don't try and send objects if there are none to send (client hung up already)

John Carr 16 سال پیش
والد
کامیت
0322de3832
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      dulwich/server.py

+ 5 - 0
dulwich/server.py

@@ -146,6 +146,11 @@ class UploadPackHandler(Handler):
 
         graph_walker = ProtocolGraphWalker(self.proto)
         num_objects, objects_iter = self.backend.fetch_objects(determine_wants, graph_walker, progress)
+
+        # Do they want any objects?
+        if num_objects == 0:
+            return
+
         progress("dul-daemon says what\n")
         progress("counting objects: %d, done.\n" % num_objects)
         write_pack_data(ProtocolFile(None, write), objects_iter, num_objects)