mike820324 / microProxy

A http/https interceptor written in pure python.
MIT License
17 stars 3 forks source link

Remove pause/resume methods from microproxy iostream. #199

Closed mike820324 closed 7 years ago

mike820324 commented 7 years ago

The root cause of "IOStream is not Idle" when calling start_tls is that current tornado iostream implementation will recv the data to buffer even when the iostream state is not reading. As a result, when some other code yield there is a posibility that the handle_read will be called.

Thie PR change the behavior of this part. When the iostream is not in reading state, we will not handle_read even when event is happened until the client called read_xxx related code.

mike820324 commented 7 years ago

@chhsiao90 finally, the pause and resume can be removed.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.3%) to 79.537% when pulling 7db954aca59f61de0c6c9eab47b8b6dc41570cf7 on remove-pause-resume into 16fd551a25ce767265dd46587b2377102e4dc8cc on master.

chhsiao90 commented 7 years ago

Great news and work! But is that a bug of tornado IOStream?

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.7%) to 80.532% when pulling f863e20de6225767f4541f13fd4ed1ad3882410c on remove-pause-resume into 16fd551a25ce767265dd46587b2377102e4dc8cc on master.

mike820324 commented 7 years ago

Force push to fix iostream regression.

As for whether or not it is a tornado bug. I'll fire a issue when I wake up. ;D