mirror of
https://codeberg.org/spire/webrcon.git
synced 2026-06-03 17:24:07 +02:00
Fix error when disconnecting from non-open socket
This commit is contained in:
parent
afa21ff310
commit
f976c757ee
2 changed files with 4 additions and 2 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
"description": "Create rcon connections using websockets",
|
"description": "Create rcon connections using websockets",
|
||||||
"author": "Robin Appelman <robin@icewind.nl>",
|
"author": "Robin Appelman <robin@icewind.nl>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "0.2.2",
|
"version": "0.2.3",
|
||||||
"main": "lib/rcon.js",
|
"main": "lib/rcon.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "babel src --out-dir lib"
|
"build": "babel src --out-dir lib"
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,8 @@ export default class WebRcon extends EventEmitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnect () {
|
disconnect () {
|
||||||
|
if (this.socket && this.socket.disconnect) {
|
||||||
this.socket.disconnect();
|
this.socket.disconnect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue