Skip to content
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

RejectedExecutionException Occured in onMessage. #53

Closed
mypplication opened this issue Mar 31, 2016 · 5 comments
Closed

RejectedExecutionException Occured in onMessage. #53

mypplication opened this issue Mar 31, 2016 · 5 comments

Comments

@nkzawa
Copy link
Contributor

nkzawa commented Mar 31, 2016

Hi, thanks for your report. Let me know how to reproduce if possible.

@mypplication
Copy link
Author

Hello, sorry but for the moment, i can't reproduce..
if you look pkHttp3 websocket implementation, you can see ThreadPoolExecutor if created with a pool size limited to 1
https://github.com/square/okhttp/blob/master/okhttp-ws%2Fsrc%2Fmain%2Fjava%2Fokhttp3%2Fws%2FWebSocketCall.java#L162
I think is the source of this issue

@dusanvita
Copy link

Hi, I'm experiencing the same exception, but in onClose(), not onMessage() of RealWebSocket's reader implementation because ThreadPoolExecutor (replyExecutor) is not at all used in onMessage() but in on onPing() and onClose(). My only assumption is that ping response runner is already in the pool at the point of onClose request from the server so it throws an exception since it can only have one runner at the time.

This issue definitely is occurring while using engine.io/socket.io but I rather think it is in the OkHttp library itself and not here...

@shobhitpuri
Copy link

shobhitpuri commented Jan 25, 2017

Just saw this thread after creating the issue #81 . I think what @mypplication said contributes to Out of Memory exceptions as well as mentioned there. For reproducing it, try connecting calling doOpen() and closing connection multiple times.

@darrachequesne
Copy link
Member

Closed due to inactivity, please reopen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants