Show More
@@ -79,10 +79,14 b' class webproto(wireproto.abstractserverp' | |||
|
79 | 79 | # the server's network or CPU. |
|
80 | 80 | z = zlib.compressobj(self.ui.configint('server', 'zliblevel', -1)) |
|
81 | 81 | while True: |
|
82 |
chunk = cg.read( |
|
|
82 | chunk = cg.read(32768) | |
|
83 | 83 | if not chunk: |
|
84 | 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 | 90 | yield z.flush() |
|
87 | 91 | def _client(self): |
|
88 | 92 | return 'remote:%s:%s:%s' % ( |
General Comments 0
You need to be logged in to leave comments.
Login now