##// END OF EJS Templates
wireprotov2: don't emit empty frames...
Gregory Szorc -
r40171:3a6d6c54 default
parent child Browse files
Show More
@@ -531,6 +531,9 b' class bufferingcommandresponseemitter(ob'
531 # * If a chunk causes us to go over our buffering limit, we flush
531 # * If a chunk causes us to go over our buffering limit, we flush
532 # and then buffer the new chunk.
532 # and then buffer the new chunk.
533
533
534 if not data:
535 return
536
534 if len(data) > self._maxsize:
537 if len(data) > self._maxsize:
535 for frame in self._flush():
538 for frame in self._flush():
536 yield frame
539 yield frame
@@ -573,6 +576,9 b' class bufferingcommandresponseemitter(ob'
573 self._chunks[:] = []
576 self._chunks[:] = []
574 self._chunkssize = 0
577 self._chunkssize = 0
575
578
579 if not payload:
580 return
581
576 yield self._stream.makeframe(
582 yield self._stream.makeframe(
577 self._requestid,
583 self._requestid,
578 typeid=FRAME_TYPE_COMMAND_RESPONSE,
584 typeid=FRAME_TYPE_COMMAND_RESPONSE,
@@ -394,7 +394,6 b' class ServerReactorTests(unittest.TestCa'
394 b'1 2 0 command-response continuation Y\x80d',
394 b'1 2 0 command-response continuation Y\x80d',
395 b'1 2 0 command-response continuation %s' % first,
395 b'1 2 0 command-response continuation %s' % first,
396 b'1 2 0 command-response continuation %s' % second,
396 b'1 2 0 command-response continuation %s' % second,
397 b'1 2 0 command-response continuation ',
398 b'1 2 0 command-response eos '
397 b'1 2 0 command-response eos '
399 ])
398 ])
400
399
General Comments 0
You need to be logged in to leave comments. Login now