This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The spec should explicitly indicate the default values for the code and reason attributes if there are no values from the server (a non-clean close). We recommend 0 for the code and null for reason.
With the -08 protocol changes, it looks like 1006 should be the default value for the code and empty string for the reason when no CLOSE_FRAME is received from the server (unclean close).
The protocol spec defines this for us; the API spec explicitly references the same terms as the protocol spec to make sure the loop is closed on this.