socket.io-adapter
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -0,1 +1,10 @@ | ||
## [2.0.1](https://github.com/socketio/socket.io-adapter/compare/2.0.0...2.0.1) (2020-09-28) | ||
### Bug Fixes | ||
* Adapter#encode() is now synchronous ([c043650](https://github.com/socketio/socket.io-adapter/commit/c043650f1c6e58b20364383103314ddc733e4615)) | ||
# [2.0.0](https://github.com/socketio/socket.io-adapter/compare/1.1.2...2.0.0) (2020-09-25) | ||
@@ -2,0 +11,0 @@ |
@@ -94,28 +94,27 @@ "use strict"; | ||
packet.nsp = this.nsp.name; | ||
this.encoder.encode(packet, encodedPackets => { | ||
if (rooms.size) { | ||
for (const room of rooms) { | ||
if (!this.rooms.has(room)) | ||
const encodedPackets = this.encoder.encode(packet); | ||
if (rooms.size) { | ||
for (const room of rooms) { | ||
if (!this.rooms.has(room)) | ||
continue; | ||
for (const id of this.rooms.get(room)) { | ||
if (ids.has(id) || except.has(id)) | ||
continue; | ||
for (const id of this.rooms.get(room)) { | ||
if (ids.has(id) || except.has(id)) | ||
continue; | ||
const socket = this.nsp.connected.get(id); | ||
if (socket) { | ||
socket.packet(encodedPackets, packetOpts); | ||
ids.add(id); | ||
} | ||
} | ||
} | ||
} | ||
else { | ||
for (const [id] of this.sids) { | ||
if (except.has(id)) | ||
continue; | ||
const socket = this.nsp.connected.get(id); | ||
if (socket) | ||
if (socket) { | ||
socket.packet(encodedPackets, packetOpts); | ||
ids.add(id); | ||
} | ||
} | ||
} | ||
}); | ||
} | ||
else { | ||
for (const [id] of this.sids) { | ||
if (except.has(id)) | ||
continue; | ||
const socket = this.nsp.connected.get(id); | ||
if (socket) | ||
socket.packet(encodedPackets, packetOpts); | ||
} | ||
} | ||
} | ||
@@ -122,0 +121,0 @@ /** |
{ | ||
"name": "socket.io-adapter", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
9335
0
229