Comments (6)
Hm, we don't remove useful information from the original error as far as I can remember (so you can print an error if you map it in map_err
for instance or handle it by any other means) and I don't remember having Other
error with an empty error description. We also do not create any ErrorKind::Other
errors explicitly. Could you check if you can establish a regular TCP / TLS connection to the server?
from tokio-tungstenite.
thanks for your reply.
Looks like I overlooked this and something else must be generating an error and dropping the original cause; I'll dig a bit further.
Sorry for the confusion.
from tokio-tungstenite.
I'm running into the exact same thing:
match connect_async(url.clone()).await {
Ok((mut ws_stream, _response)) => {
debug!("Connected to {}", url);
...
}
Err(e) => {
debug!("Last OS Error: {}", Error::last_os_error());
debug!("Failed to connect to {:?}: {:?}", url, e);
Err(format!("connection failed: {:?}", e))
}
}
Trying to figure out what it was, I reported the last OS error (though I don't think it's the issue -- that just looks like a typical nonblocking connect result).
Last OS Error: Resource temporarily unavailable (os error 35)
Failed to connect to "<<redacted>>": Io(Custom { kind: Other, error: "" })
Even with full debugging enabled, I'm not seeing anything useful from tungstenite or hyper, which is a little surprising. Connecting to the websocket endpoint using openssl
works as expected.
from tokio-tungstenite.
Discovered a bit more. This is happening when the endpoint returns a 404.
from tokio-tungstenite.
Hm, I believe that one of the underlying libraries does something fishy. The reason I think it's the case is because we don't create any customer errors with an empty error code inside tungstenite-rs
. Is there a server which could be used to test / reproduce this behavior?
from tokio-tungstenite.
In my case it was something else, sorry for the confusion.
I fixed several things so I can't really tell you exactly what it was, but for sure it did not look like tokio-tungstenite was causing the issue.
thanks for the help!
from tokio-tungstenite.
Related Issues (20)
- Passing body in `connect`? HOT 2
- Can we provided a way to keep the original header name case. HOT 1
- 403 Forbidden HOT 1
- "WebSocket protocol error: httparse error: invalid token" when connect from ngrok tcp tunnel. HOT 5
- Is it possible to bind client to specific interface? HOT 1
- 没有连接断开时,直接检测客户端的状态的api,以实现重新连接,这在其它语言中都是常见的
- Performance boost implementing `poll_write_vectored` and rustls 0.23 HOT 2
- Is MaybeTlsStream supposed to work for servers too? HOT 2
- 0.20 and 0.21 break something HOT 25
- Vectorized send HOT 2
- new rustls 0.23.x is incompatible with the 0.22.x used by tokio-tungstenite HOT 2
- Adding authorization header leads in infinite block of connect_async HOT 2
- How to correctly handle large messages HOT 1
- How can I send pong frames as heartbeats from a client? HOT 4
- Specify default-features = false for rustls in Cargo.toml
- Websocket missing some ping messages. HOT 2
- tokio-tungstenite not using version 0.22 of tungstenite HOT 1
- no process-level CryptoProvider available -- call CryptoProvider::install_default() before this point HOT 5
- No option to enable `url` flag on `tungstenite` HOT 1
- How to reply to the client and send a message if an error occures on `accept_async` funtion. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tokio-tungstenite.