Skip to content

Commit

Permalink
fix: default to 1005 within close();
Browse files Browse the repository at this point in the history
- thanks @TehShrike
  • Loading branch information
lukeed committed Nov 14, 2018
1 parent 6c70c73 commit d935a48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Identical to [`WebSocket#send()`][send], capable of sending multiple data types.

Identical to [`WebSocket#close()`][close].

> **Note:** The `code` will default to `1000` unless specified.
> **Note:** The `code` will default to `1005` unless specified.
### json(obj)

Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function (url, opts) {
};

$.close = function (x, y) {
ws.close(x || 1e3, y);
ws.close(x || 1005, y);
};

$.open(); // init
Expand Down

0 comments on commit d935a48

Please sign in to comment.