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:
Sean McArthur
2018-06-18 16:01:01 -07:00
parent 27db8b0061
commit 482a5f589e
7 changed files with 63 additions and 30 deletions

View File

@@ -132,7 +132,7 @@ where
::Body::h2(stream, content_length)
});
let fut = H2Stream::new(service.call(req), respond);
exec.execute(fut);
exec.execute(fut)?;
}
// no more incoming streams...