Skip to content

Commit d0773b8

Browse files
chore(release): 6.2.0
Diff: 6.1.1...6.2.0
1 parent bc3cefb commit d0773b8

9 files changed

+561
-476
lines changed

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
# [6.2.0](https://github.com/socketio/engine.io-client/compare/6.1.1...6.2.0) (2022-04-17)
2+
3+
4+
### Features
5+
6+
* add details to the "close" event ([b9252e2](https://github.com/socketio/engine.io-client/commit/b9252e207413a850db7e4f0f0ef7dd2ef0ed26da))
7+
8+
The close event will now include additional details to help debugging if anything has gone wrong.
9+
10+
Example when a payload is over the maxHttpBufferSize value in HTTP long-polling mode:
11+
12+
```js
13+
socket.on("close", (reason, details) => {
14+
console.log(reason); // "transport error"
15+
16+
// in that case, details is an error object
17+
console.log(details.message); "xhr post error"
18+
console.log(details.description); // 413 (the HTTP status of the response)
19+
20+
// details.context refers to the XMLHttpRequest object
21+
console.log(details.context.status); // 413
22+
console.log(details.context.responseText); // ""
23+
});
24+
```
25+
26+
Note: the error object was already included before this commit and is kept for backward compatibility.
27+
28+
* slice write buffer according to the maxPayload value ([46fdc2f](https://github.com/socketio/engine.io-client/commit/46fdc2f0ed352b454614247406689edc9d908927))
29+
30+
The server will now include a "maxPayload" field in the handshake details, allowing the clients to decide how many
31+
packets they have to send to stay under the maxHttpBufferSize value.
32+
33+
34+
135
## [6.0.3](https://github.com/socketio/engine.io-client/compare/6.0.2...6.0.3) (2021-11-14)
236

337
Some bug fixes were backported from master, to be included by the latest `socket.io-client` version.

dist/engine.io.esm.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/engine.io.esm.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)