mercurial/wireprotoframing.py
changeset 40136 3a6d6c54bd81
parent 40135 966b5f7fd30b
child 40138 b5bf3dd6ec5b
--- a/mercurial/wireprotoframing.py	Fri Oct 05 10:29:36 2018 -0700
+++ b/mercurial/wireprotoframing.py	Fri Oct 05 23:49:18 2018 +0000
@@ -531,6 +531,9 @@
         # * If a chunk causes us to go over our buffering limit, we flush
         #   and then buffer the new chunk.
 
+        if not data:
+            return
+
         if len(data) > self._maxsize:
             for frame in self._flush():
                 yield frame
@@ -573,6 +576,9 @@
         self._chunks[:] = []
         self._chunkssize = 0
 
+        if not payload:
+            return
+
         yield self._stream.makeframe(
             self._requestid,
             typeid=FRAME_TYPE_COMMAND_RESPONSE,