Closed
Description
When connecting with HTTPS to a Flask SocketIO server I'm seeing a slowdown of 20 seconds waiting for a response compared to http.
This is happening with header auth and with certificate auth.
let socket = SocketBuilder::new("https://$IP$".to_string())
.opening_header(
"Authorization",
settings.header_auth_value.as_str()
)
.on("open", connect_callback)
.on("submit", submit_callback)
.on("error", |err, _| {
warn!("Server Connection Error: {:#?}", err)
})
.on("error", |err, _| eprintln!("Error: {:#?}", err))
// .transport_type(TransportType::WebsocketUpgrade)
// .tls_config(tls_connector)
.connect();
I can see in the nginx logs that the websocket upgrade is switching protocols
client GET /socket.io/?EIO=4&sid=n4wlLsEmzjqGaiGHAAAG&transport=websocket HTTP/1.1 101 45
Any ideas on what could be going wrong?
PS. Not seeing this degradation with python socket io client