Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate websocket timeouts #20850

Closed
wants to merge 13 commits into from

Improve debug output for failed connections.

  • Loading branch information
jdm committed Jun 7, 2018
commit 06b833b0b75bd499dcefb255967f9b8394e85a1d
@@ -40,6 +40,7 @@ pub fn init(
http_state: Arc<HttpState>
) {
thread::Builder::new().name(format!("WebSocket connection to {}", req_init.url)).spawn(move || {
let url = req_init.url.clone();
let channel = establish_a_websocket_connection(req_init, &http_state);
let (ws_sender, mut receiver) = match channel {
Ok((protocol_in_use, sender, receiver)) => {
@@ -48,7 +49,7 @@ pub fn init(
(sender, receiver)
},
Err(e) => {
debug!("Failed to establish a WebSocket connection: {:?}", e);
debug!("Failed to establish a WebSocket connection to {}: {:?}", url, e);
let _ = resource_event_sender.send(WebSocketNetworkEvent::Fail);
return;
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.