Show More
@@ -79,10 +79,14 b' class webproto(wireproto.abstractserverp' | |||||
79 | # the server's network or CPU. |
|
79 | # the server's network or CPU. | |
80 | z = zlib.compressobj(self.ui.configint('server', 'zliblevel', -1)) |
|
80 | z = zlib.compressobj(self.ui.configint('server', 'zliblevel', -1)) | |
81 | while True: |
|
81 | while True: | |
82 |
chunk = cg.read( |
|
82 | chunk = cg.read(32768) | |
83 | if not chunk: |
|
83 | if not chunk: | |
84 | break |
|
84 | break | |
85 |
|
|
85 | data = z.compress(chunk) | |
|
86 | # Not all calls to compress() emit data. It is cheaper to inspect | |||
|
87 | # that here than to send it via the generator. | |||
|
88 | if data: | |||
|
89 | yield data | |||
86 | yield z.flush() |
|
90 | yield z.flush() | |
87 | def _client(self): |
|
91 | def _client(self): | |
88 | return 'remote:%s:%s:%s' % ( |
|
92 | return 'remote:%s:%s:%s' % ( |
General Comments 0
You need to be logged in to leave comments.
Login now