-
-
Notifications
You must be signed in to change notification settings - Fork 749
Open
Description
try_bind doesn't return anything, contrary to it's description and doesn't seem usable at all in current form.
Lines 182 to 203 in 1cbf029
| /// Bind to a socket address, returning a `Future` that can be | |
| /// executed on any runtime. | |
| /// | |
| /// In case we are unable to bind to the specified address, resolves to an | |
| /// error and logs the reason. | |
| pub async fn try_bind(self, addr: impl Into<SocketAddr>) { | |
| let addr = addr.into(); | |
| let srv = match try_bind!(self, &addr) { | |
| Ok((_, srv)) => srv, | |
| Err(err) => { | |
| tracing::error!("error binding to {}: {}", addr, err); | |
| return; | |
| } | |
| }; | |
| srv.map(|result| { | |
| if let Err(err) = result { | |
| tracing::error!("server error: {}", err) | |
| } | |
| }) | |
| .await; | |
| } |
should probably behave like try_bind_ephemeral
https://github.com/seanmonstar/warp/blob/master/src/server.rs#L227-L247
huntc
Metadata
Metadata
Assignees
Labels
No labels