diff options
| -rw-r--r-- | src/proxy.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/proxy.cc b/src/proxy.cc index 5eca4fb..3582b4f 100644 --- a/src/proxy.cc +++ b/src/proxy.cc @@ -1215,6 +1215,7 @@ void ProxyImpl::close_client_when_done(size_t index) { client.pkg_id = 0; } looper_->modify(client.fd.get(), client.write_flag); + client_empty_input(index); } void ProxyImpl::client_remote_event(size_t index, int fd, uint8_t events) { @@ -1347,6 +1348,7 @@ void ProxyImpl::client_remote_event(size_t index, int fd, uint8_t events) { } close_base(&client.remote); client.remote_state = CLOSED; + client_empty_input(index); break; } return; @@ -1402,6 +1404,9 @@ void ProxyImpl::client_remote_event(size_t index, int fd, uint8_t events) { return; } client.remote.in->consume(response->size()); + if (client.remote_state == WAITING) { + client_empty_input(index); + } break; } case CONTENT_LEN: @@ -1434,6 +1439,7 @@ void ProxyImpl::client_remote_event(size_t index, int fd, uint8_t events) { client.remote.read_flag = 0; client.remote.write_flag = 0; looper_->modify(client.remote.fd.get(), 0); + client_empty_input(index); return; case CONTENT_CHUNKED: { auto used = client.remote.content.chunked->add(ptr, avail); @@ -1462,6 +1468,7 @@ void ProxyImpl::client_remote_event(size_t index, int fd, uint8_t events) { client.remote.read_flag = 0; client.remote.write_flag = 0; looper_->modify(client.remote.fd.get(), 0); + client_empty_input(index); } break; } |
