square/SocketRocket — pull request #157 by pizthewiz (2014-03-19 20:47:27+00:00)
Title: use 'normal closure' close code by default, fixes #127

SocketRocket uses the invalid close code `-1` as the value in the default close method. In addition to being invalid, it causes issues when communicating with some libraries. See section 11.7 WebSocket Close Code Number Registry in the [WebSocket Protocol RFC 6455](http://datatracker.ietf.org/doc/rfc6455/?include_text=1) for more detail.

```
Status Code
The Status Code denotes a reason for a WebSocket connection
closure as per Section 7.4 of this document. The status code is
an integer number between 1000 and 4999 (inclusive).
```