socketio / socket.io-client-java

Full-featured Socket.IO Client Library for Java, which is compatible with Socket.IO v1.0 and later.
https://socketio.github.io/socket.io-client-java/installation.html
Other
5.34k stars 976 forks source link

RejectedExecutionException after sleep in okhttp3.internal.ws.RealWebSocket.connect #539

Open mstrelex opened 6 years ago

mstrelex commented 6 years ago

Hi,

Getting the following exception after computer returns from sleep mode:

Exception in thread "EventThread" java.util.concurrent.RejectedExecutionException: Task okhttp3.RealCall$AsyncCall@17c8d3 rejected from java.util.concurrent.ThreadPoolExecutor@7822a9d2[Shutting down, pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 25] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1379) at okhttp3.Dispatcher.enqueue(Dispatcher.java:132) at okhttp3.RealCall.enqueue(RealCall.java:100) at okhttp3.internal.ws.RealWebSocket.connect(RealWebSocket.java:192) at okhttp3.OkHttpClient.newWebSocket(OkHttpClient.java:438) at io.socket.engineio.client.transports.WebSocket.doOpen(WebSocket.java:50) at io.socket.engineio.client.Transport$1.run(Transport.java:74) at io.socket.thread.EventThread.exec(EventThread.java:55) at io.socket.engineio.client.Transport.open(Transport.java:69) at io.socket.engineio.client.Socket.probe(Socket.java:508) at io.socket.engineio.client.Socket.onOpen(Socket.java:521) at io.socket.engineio.client.Socket.onHandshake(Socket.java:568) at io.socket.engineio.client.Socket.onPacket(Socket.java:539) at io.socket.engineio.client.Socket.access$1000(Socket.java:36) at io.socket.engineio.client.Socket$5.call(Socket.java:335) at io.socket.emitter.Emitter.emit(Emitter.java:117) at io.socket.engineio.client.Transport.onPacket(Transport.java:126) at io.socket.engineio.client.transports.Polling.access$700(Polling.java:18) at io.socket.engineio.client.transports.Polling$2.call(Polling.java:127) at io.socket.engineio.parser.Parser.decodePayload(Parser.java:241) at io.socket.engineio.client.transports.Polling._onData(Polling.java:135) at io.socket.engineio.client.transports.Polling.onData(Polling.java:102) at io.socket.engineio.client.transports.PollingXHR$5$1.run(PollingXHR.java:125) at io.socket.thread.EventThread$2.run(EventThread.java:80) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

Already on version 1.0.0 and okhttp 3.10.0

Any ideas? Much obliged.

mstrelex commented 6 years ago

Anyone ?

https://github.com/square/okhttp/issues/4152 https://github.com/square/okhttp/pull/4153