2
0
Эх сурвалжийг харах

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

John Carr 16 жил өмнө
parent
commit
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)