I'd like to bring up a question that came up while developing the SimplePush Server. The server has a scheduled job that will clean up inactive UserAgents. When it does the clean up, the connection will also be closed by the server (if it is still active) and an error code with a message is returned. This will be a SockJS close frame which looks like this:
c[3039,"Connection closed due to inactivity"]
Now, the status code which is the first entry above is just something I made up. It might be nice to have a few different error codes to signal to the client the reason for closing, as the client might want to take some action. I've not found anything in the SimplePush Protocol Specification yet, and thought I bring this up for discussion.