socket.io-adapter
Advanced tools
Comparing version 2.3.1 to 2.3.2
@@ -0,1 +1,9 @@ | ||
## [2.3.2](https://github.com/socketio/socket.io-adapter/compare/2.3.1...2.3.2) (2021-08-28) | ||
### Bug Fixes | ||
* fix race condition when leaving rooms ([#74](https://github.com/socketio/socket.io-adapter/issues/74)) ([912e13a](https://github.com/socketio/socket.io-adapter/commit/912e13ad30bd584e2ece747be96a1ba0669dd874)) | ||
## [2.3.1](https://github.com/socketio/socket.io-adapter/compare/2.3.0...2.3.1) (2021-05-19) | ||
@@ -2,0 +10,0 @@ |
@@ -62,9 +62,9 @@ "use strict"; | ||
_del(room, id) { | ||
if (this.rooms.has(room)) { | ||
const deleted = this.rooms.get(room).delete(id); | ||
const _room = this.rooms.get(room); | ||
if (_room != null) { | ||
const deleted = _room.delete(id); | ||
if (deleted) { | ||
this.emit("leave-room", room, id); | ||
} | ||
if (this.rooms.get(room).size === 0) { | ||
this.rooms.delete(room); | ||
if (_room.size === 0 && this.rooms.delete(room)) { | ||
this.emit("delete-room", room); | ||
@@ -71,0 +71,0 @@ } |
{ | ||
"name": "socket.io-adapter", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"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
16212