1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-10-21 17:33:59 +00: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