fix(lib): return an error instead of panic if execute fails
If executing an internal task fails, a new variant of `hyper::Error` is returned to the user, with improved messaging. If a non-critical task fails to spawn, it no longer panics, instead just logging a warning. Closes #1566
This commit is contained in:
@@ -641,7 +641,7 @@ where
|
||||
// flatten basically
|
||||
.and_then(|conn| conn.with_upgrades())
|
||||
.map_err(|err| debug!("conn error: {}", err));
|
||||
self.serve.protocol.exec.execute(fut);
|
||||
self.serve.protocol.exec.execute(fut)?;
|
||||
} else {
|
||||
return Ok(Async::Ready(()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user