-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
A-errorArea: error handlingArea: error handlingB-rfcBlocked: More comments would be useful in determine next steps.Blocked: More comments would be useful in determine next steps.
Description
I have an application in which I want to try to set up a server on a specific port, but if that port is taken (i.e., an AddrInUse error is raised), it should fall back to any port (i.e., port 0). Unfortunately, since hyper's error type is now opaque (as of 5d3c472), I can no longer easily see if that was the cause of an error raised by Server::try_bind.
While I could construct a TcpListener myself and then pass that listener's Incoming to Server::builder, that's an unfortunate amount of extra boilerplate. Perhaps it would make sense to expose an as_io_error(&self) -> Option<&io::Error> on hyper::Error?
Metadata
Metadata
Assignees
Labels
A-errorArea: error handlingArea: error handlingB-rfcBlocked: More comments would be useful in determine next steps.Blocked: More comments would be useful in determine next steps.