mirror of
https://codeberg.org/spire/webrcon.git
synced 2026-06-04 01:34:06 +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
|
|
@ -64,6 +64,8 @@ export default class WebRcon extends EventEmitter {
|
|||
}
|
||||
|
||||
disconnect () {
|
||||
this.socket.disconnect();
|
||||
if (this.socket && this.socket.disconnect) {
|
||||
this.socket.disconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue