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

Support error codes 1012 (Service Restart), 1013 (Try Again Later) and 1014 (Bad Gateway) #639

Closed
ebourg opened this issue Dec 22, 2017 · 4 comments · Fixed by #651
Closed

Comments

@ebourg
Copy link

ebourg commented Dec 22, 2017

Hi,

Using Java-WebSocket 1.3.7 as a client I encountered an InvalidDataException "Trying to send an illegal close code!" when the server sends an 1013 error code (Try Again Later). Looking at the CloseFrame.java
class it seems the error codes 1012, 1013 and 1014 are not supported yet and trigger an exception on the client side.

@marci4
Copy link
Collaborator

marci4 commented Dec 23, 2017

Hello @ebourg,

thank you for your issue!

These close frames are not part of the official RFC and were added later.
Could you tell me which endpoints use these close codes?

Greetings
marci4

@ebourg
Copy link
Author

ebourg commented Dec 23, 2017

The Java WebSocket API 1.1 has the codes 1012 and 1013 which are implemented in application servers such as Tomcat or Jetty. The code 1014 is described on the Mozilla Developer Network.

@marci4
Copy link
Collaborator

marci4 commented Dec 24, 2017

Hello @ebourg,

thank you very much for your feedback.

Do you think you could submit a PR for this?
Thank you!

Greetings
marci4

@marci4 marci4 self-assigned this Jan 15, 2018
marci4 added a commit to marci4/Java-WebSocket-Dev that referenced this issue Jan 18, 2018
Adjusted test
Added close codes
Fixes TooTallNate#639
@ebourg
Copy link
Author

ebourg commented Jan 22, 2018

Thank you for the fix!

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

Successfully merging a pull request may close this issue.

2 participants