mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-24 16:02:59 +01:00
fix HttpServer::listen method
This commit is contained in:
parent
b06cf32329
commit
67bf0ae79f
@ -177,8 +177,9 @@ impl<H> HttpServer<H> where H: IntoHttpHandler + 'static
|
|||||||
///
|
///
|
||||||
/// HttpServer does not change any configuration for TcpListener,
|
/// HttpServer does not change any configuration for TcpListener,
|
||||||
/// it needs to be configured before passing it to listen() method.
|
/// it needs to be configured before passing it to listen() method.
|
||||||
pub fn listen(mut self, lst: net::TcpListener) {
|
pub fn listen(mut self, lst: net::TcpListener) -> Self {
|
||||||
self.sockets.insert(lst.local_addr().unwrap(), lst);
|
self.sockets.insert(lst.local_addr().unwrap(), lst);
|
||||||
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The socket address to bind
|
/// The socket address to bind
|
||||||
|
Loading…
Reference in New Issue
Block a user