equal
deleted
inserted
replaced
479 } |
479 } |
480 } |
480 } |
481 |
481 |
482 fn init_client(&mut self, poll: &Poll, client_id: ClientId) { |
482 fn init_client(&mut self, poll: &Poll, client_id: ClientId) { |
483 let mut response = handlers::Response::new(client_id); |
483 let mut response = handlers::Response::new(client_id); |
484 #[cfg(feature = "tls-connections")] |
484 |
485 response.add(Redirect(self.ssl.listener.local_addr().unwrap().port()).send_self()); |
485 if let ClientSocket::Plain(_) = self.clients[client_id].socket { |
|
486 #[cfg(feature = "tls-connections")] |
|
487 response.add(Redirect(self.ssl.listener.local_addr().unwrap().port()).send_self()) |
|
488 } |
486 |
489 |
487 handlers::handle_client_accept(&mut self.server, client_id, &mut response); |
490 handlers::handle_client_accept(&mut self.server, client_id, &mut response); |
488 self.handle_response(response, poll); |
491 self.handle_response(response, poll); |
489 } |
492 } |
490 |
493 |