ported would-block fix from client to server

This commit is contained in:
Benjamin Fry 2016-08-12 23:46:49 -07:00
parent 7110cc3538
commit 7e718b4f36
3 changed files with 7 additions and 5 deletions

View File

@ -2,9 +2,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## 0.7.2 2016-08-10
## 0.7.3 2016-08-12
### Fixed
- Issue #27: label case sensitivity revisited for RRSIG signing
- Issue #27: label case sensitivity revisited for RRSIG signing, RFC 6840
- TCP reregister on would-block errors
## 0.7.2 2016-08-10
### Fixed

View File

@ -276,8 +276,10 @@ impl Handler for Server {
}
},
Err(ref e) if io::ErrorKind::WouldBlock == e.kind() => {
// this is expected with the connection would block
// noop
debug!("WouldBlock, reregistering for next call: {:?}", handler.get_events());
if let Err(e) = event_loop.reregister(handler.get_stream(), token, handler.get_events(), PollOpt::all()) {
error!("could not reregister stream: {:?} cause: {}", handler.get_stream(), e);
}
},
Err(e) => {
// shutdown the connection, remove it.

View File

@ -137,7 +137,6 @@ impl Handler for ClientHandler {
debug!("WouldBlock, reregistering for next call: {:?}", self.handler.get_events());
if let Err(e) = event_loop.reregister(self.handler.get_stream(), token, self.handler.get_events(), PollOpt::all()) {
error!("could not reregister stream: {:?} cause: {}", self.handler.get_stream(), e);
// FIXME: Maybe it doesn't need reregistration on this system?
}
},
Err(e) => {