Print "unknown peer" instead of null, if no RPC peer is known
This commit is contained in:
parent
652aa22048
commit
3f8660a3c4
|
@ -422,7 +422,7 @@ export default class PeerClient {
|
|||
this.stopped = false
|
||||
this.notificationID = 0
|
||||
this.maxCommandID = 0
|
||||
this.peerID = null
|
||||
this.peerID = ""
|
||||
this.deviceName = "KakaoTalk Bridge"
|
||||
/** @type {[string]} */
|
||||
this.loggingKeys = []
|
||||
|
@ -483,11 +483,11 @@ export default class PeerClient {
|
|||
if (this.peerID && this.manager.clients.get(this.peerID) === this) {
|
||||
this.manager.clients.delete(this.peerID)
|
||||
}
|
||||
this.log(`Connection closed (peer: ${this.peerID})`)
|
||||
this.log(`Connection closed (peer: ${this.peerID || "unknown peer"})`)
|
||||
}
|
||||
|
||||
#closeUsers() {
|
||||
this.log("Closing all API clients for", this.peerID)
|
||||
this.log(`Closing all API clients for ${this.peerID || "unknown peer"}`)
|
||||
for (const userClient of this.userClients.values()) {
|
||||
userClient.disconnect()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue