micro-http: explicit HUP/ERR handling in server
The server in `micro_http` was not explicitly handling the `EPOLLHUP`, `EPOLLRDHUP` and `EPOLLERR` epoll events. Added new checks that close a connection that is signaled with these events. Signed-off-by: George Pisaltu <gpl@amazon.com> Signed-off-by: YUAN LYU <lyuyuan92@gmail.com>
This commit is contained in:
committed by
Adrian Catangiu
parent
ed44e2af6f
commit
e73f412536
@@ -428,7 +428,8 @@ impl<T: Read + Write> HttpConnection<T> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn clear_write_buffer(&mut self) {
|
||||
/// Discards all pending writes from the connection.
|
||||
pub fn clear_write_buffer(&mut self) {
|
||||
self.response_queue.clear();
|
||||
self.response_buffer.take();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user