EOFException handling permessage-deflate response with OkHttp4.5 Websocket
See original GitHub issueHello. I use latest version of OKHttp4.5 and send websocket request with permessage-deflate header which is a compression protocol. But sometime reponse message data is parsed wrong, may be the response message data (original is 140K) is too large. the system error log as follows. Bofore Version of 4.5, everything is ok. I doubt this version is not stable for permessage-deflate protocol.
2020-04-20 18:15:53.144 32664-32689/com. W/System.err: java.io.EOFException: source exhausted prematurely
2020-04-20 18:15:53.144 32664-32689/com. W/System.err: at okio.InflaterSource.read(InflaterSource.kt:75)
2020-04-20 18:15:53.144 32664-32689/com. W/System.err: at okhttp3.internal.ws.MessageInflater.inflate(MessageInflater.kt:58)
2020-04-20 18:15:53.144 32664-32689/com. W/System.err: at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.kt:241)
2020-04-20 18:15:53.144 32664-32689/com. W/System.err: at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.kt:106)
2020-04-20 18:15:53.144 32664-32689/com. W/System.err: at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.kt:293)
2020-04-20 18:15:53.144 32664-32689/com. W/System.err: at okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.kt:195)
2020-04-20 18:15:53.144 32664-32689/com. W/System.err: at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:504)
2020-04-20 18:15:53.144 32664-32689/com. W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
2020-04-20 18:15:53.144 32664-32689/com. W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
2020-04-20 18:15:53.144 32664-32689/com. W/System.err: at java.lang.Thread.run(Thread.java:761)
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
EOFException on websocket · Issue #3113 · square/okhttp
After connecting to webservice every single minute (seems like some ping) I'm getting the below exception (which forces me to reconnect).
Read more >Websocket closes connection with EOF exception on "101 ...
After a successful connection and a short period of inactivity, the OKHttp3 websocket throws an EOFException in response to a 101 Switching ...
Read more >Tomcat: EOFException when trying to reconnect via Websockets
I have a problem using ktor websockets, I had two different client types: ... Text(JSON.stringify(params))) } } catch (e: Exception) { println(e.message) ...
Read more >Intermittent connection to? - Dremio Community
The error is about sockets being closed unexpectedly, which is not a problem since it can happen when users close browsers for example....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@yschimke we have not empty message
@yschimke This is a simple and normal websocket server using Netty. It’s good for web brower, not for version of OkHttp4.5.