Skip to content

Commit

Permalink
chore(release): 6.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Apr 17, 2022
1 parent bc3cefb commit d0773b8
Show file tree
Hide file tree
Showing 9 changed files with 561 additions and 476 deletions.
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
# [6.2.0](https://github.com/socketio/engine.io-client/compare/6.1.1...6.2.0) (2022-04-17)


### Features

* add details to the "close" event ([b9252e2](https://github.com/socketio/engine.io-client/commit/b9252e207413a850db7e4f0f0ef7dd2ef0ed26da))

The close event will now include additional details to help debugging if anything has gone wrong.

Example when a payload is over the maxHttpBufferSize value in HTTP long-polling mode:

```js
socket.on("close", (reason, details) => {
console.log(reason); // "transport error"

// in that case, details is an error object
console.log(details.message); "xhr post error"
console.log(details.description); // 413 (the HTTP status of the response)

// details.context refers to the XMLHttpRequest object
console.log(details.context.status); // 413
console.log(details.context.responseText); // ""
});
```

Note: the error object was already included before this commit and is kept for backward compatibility.

* slice write buffer according to the maxPayload value ([46fdc2f](https://github.com/socketio/engine.io-client/commit/46fdc2f0ed352b454614247406689edc9d908927))

The server will now include a "maxPayload" field in the handshake details, allowing the clients to decide how many
packets they have to send to stay under the maxHttpBufferSize value.



## [6.0.3](https://github.com/socketio/engine.io-client/compare/6.0.2...6.0.3) (2021-11-14)

Some bug fixes were backported from master, to be included by the latest `socket.io-client` version.
Expand Down
6 changes: 3 additions & 3 deletions dist/engine.io.esm.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/engine.io.esm.min.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit d0773b8

Please sign in to comment.