-
Notifications
You must be signed in to change notification settings - Fork 976
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
android socketio aways disconnect transport error #491
Comments
the same problem( |
same problem here ... |
same problem here .... please help |
Set the transports explicitly to websockets when connecting from the client. As in: The default is ['polling', 'websocket'] |
I configured my code like this, Fixed my problem... |
Sorry, late reply. I solved the problem because I used Charles, which caused the problem. When I turned off the Charles agent, the problem no longer appeared. I don't know exactly why, but the problem is solved.Thanks for your reply |
Ok~
Json Snow <notifications@github.com>於 2018年4月9日 週一,下午6:07寫道:
… Sorry, late reply. I solved the problem because I used Charles, which
caused the problem. When I turned off the Charles agent, the problem no
longer appeared. I don't know exactly why, but the problem is solved.Thanks
for your reply
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#491 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AOeJ_0b_lqx_sEiGWMUNRmwAEpeOzlfBks5tmzLWgaJpZM4Rj-eu>
.
|
I also encountered ["transport error"] in onDisConnect, the client accidentally disconnect after a period of time, the client version was 1.0.0, and then it was changed to 0.8.3, still no use, can someone help me? 我也遇到["transport error"] 在onDisConnect,客户端在使用一段时间后,偶然 disconnect 了,客户端版本是1.0.0,后来改为0.8.3,还是没有用, 有人能帮助我吗 |
Opts. Transports = new String [] {WebSocket. NAME}; I also added this setup, which is still useless. |
Dear all,
By adding |
This really worked for me.. Adding timeout using OKHTTP3, that stabilised connection. Didn't get timeout for 15 20 minutes. I didn't use HostNameVerifier and SSLSocketFactory though. |
With the previous value (10 seconds by default), a connection established with HTTP long-polling was closed if the server did not send any packet for 10 seconds (the HTTP request would timeout from the client side). It will now default to 1 minute, which is above the `pingInterval + pingTimeout` value from the server. Note: the connectTimeout and writeTimeout options are left as is (10 seconds), but you may need to increase them depending on your use case: ``` OkHttpClient client = new OkHttpClient.Builder() .connectTimeout(20, TimeUnit.SECONDS) .readTimeout(1, TimeUnit.MINUTES) .writeTimeout(1, TimeUnit.MINUTES) .build(); ``` Related: - socketio/socket.io-client-java#491 - socketio/socket.io-client-java#660
With the previous value (10 seconds by default), a connection established with HTTP long-polling was closed if the server did not send any packet for 10 seconds (the HTTP request would timeout from the client side). It will now default to 1 minute, which is above the `pingInterval + pingTimeout` value from the server. Note: the connectTimeout and writeTimeout options are left as is (10 seconds), but you may need to increase them depending on your use case: ``` OkHttpClient client = new OkHttpClient.Builder() .connectTimeout(20, TimeUnit.SECONDS) .readTimeout(1, TimeUnit.MINUTES) .writeTimeout(1, TimeUnit.MINUTES) .build(); ``` Related: - socketio/socket.io-client-java#491 - socketio/socket.io-client-java#660 Backported from fb531fa
Hello. Please help me.
Android Socketio "io.socket:socket.io-client:0.9.0".
Server: netty-socketio/1.7.7
aways from onConnect is ok to diconnected transport error。May not upgrade to websocket。Anybody encountered the same problem?Pelase help。Thank U
The text was updated successfully, but these errors were encountered: