chore(release): 4.6.1

Diff: https://github.com/socketio/socket.io-client/compare/4.6.0...4.6.1
This commit is contained in:
Damien Arrachequesne
2023-02-20 17:46:20 +01:00
parent 121fd7c73d
commit 89175d0481
10 changed files with 46 additions and 23 deletions

View File

@@ -2,6 +2,7 @@
## 2023
- [4.6.1](#461-2023-02-20) (Feb 2023)
- [4.6.0](#460-2023-02-07) (Feb 2023)
## 2022
@@ -57,7 +58,23 @@
# Release notes
# [4.6.0](https://github.com/socketio/socket.io-client/compare/4.5.4...4.6.0) (2023-02-07)
## [4.6.1](https://github.com/socketio/socket.io-client/compare/4.6.0...4.6.1) (2023-02-20)
### Bug Fixes
* do not drain the queue while the socket is offline ([4996f9e](https://github.com/socketio/socket.io-client/commit/4996f9ee71074e2d62a0f8fa95fcf7d43e99615d))
* prevent duplicate connections when multiplexing ([46213a6](https://github.com/socketio/socket.io-client/commit/46213a647ea0d4453b00bca09268f69ffd259509))
### Dependencies
- [`engine.io-client@~6.4.0`](https://github.com/socketio/engine.io-client/releases/tag/6.4.0) (no change)
- [`ws@~8.11.0`](https://github.com/websockets/ws/releases/tag/8.11.0) (no change)
## [4.6.0](https://github.com/socketio/socket.io-client/compare/4.5.4...4.6.0) (2023-02-07)
### Bug Fixes

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

28
dist/socket.io.js vendored
View File

@@ -1,5 +1,5 @@
/*!
* Socket.IO v4.6.0
* Socket.IO v4.6.1
* (c) 2014-2023 Guillermo Rauch
* Released under the MIT License.
*/
@@ -3159,6 +3159,12 @@
*/
_this._queue = [];
/**
* A sequence to generate the ID of the {@link QueuedPacket}.
* @private
*/
_this._queueSeq = 0;
_this.ids = 0;
_this.acks = {};
_this.flags = {};
@@ -3453,7 +3459,7 @@
}
var packet = {
id: this.ids++,
id: this._queueSeq++,
tryCount: 0,
pending: false,
args: args,
@@ -3499,30 +3505,30 @@
}
/**
* Send the first packet of the queue, and wait for an acknowledgement from the server.
* @param force - whether to resend a packet that has not been acknowledged yet
*
* @private
*/
}, {
key: "_drainQueue",
value: function _drainQueue() {
if (this._queue.length === 0) {
var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
if (!this.connected || this._queue.length === 0) {
return;
}
var packet = this._queue[0];
if (packet.pending) {
if (packet.pending && !force) {
return;
}
packet.pending = true;
packet.tryCount++;
var currentId = this.ids;
this.ids = packet.id; // the same id is reused for consecutive retries, in order to allow deduplication on the server side
this.flags = packet.flags;
this.emit.apply(this, packet.args);
this.ids = currentId; // restore offset
}
/**
* Sends a packet.
@@ -3759,6 +3765,8 @@
this.connected = true;
this.emitBuffered();
this.emitReserved("connect");
this._drainQueue(true);
}
/**
* Emit buffered events (received and emitted).
@@ -4504,9 +4512,7 @@
if (!socket) {
socket = new Socket(this, nsp, opts);
this.nsps[nsp] = socket;
}
if (this._autoConnect) {
} else if (this._autoConnect && !socket.active) {
socket.connect();
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{
"name": "socket.io-client",
"version": "4.6.0",
"version": "4.6.1",
"description": "Realtime application framework client",
"keywords": [
"realtime",