1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 08:22:59 +01:00

fix HttpServer::listen method

This commit is contained in:
Nikolay Kim 2018-03-07 14:46:12 -08:00
parent b06cf32329
commit 67bf0ae79f

View File

@ -177,8 +177,9 @@ impl<H> HttpServer<H> where H: IntoHttpHandler + 'static
///
/// HttpServer does not change any configuration for TcpListener,
/// 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
}
/// The socket address to bind