WebSockets: fix node+addr hash when addr is undefined
This commit is contained in:
parent
3fd7be9aba
commit
de7b76e77d
@ -33,7 +33,7 @@ export const Node = Object.freeze({
|
||||
|
||||
|
||||
export function nodeAddressHash(node, addr) {
|
||||
return [node].concat(addr).join('_');
|
||||
return [node].concat(addr || []).join('_');
|
||||
}
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ export class MessageChannel {
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
open () {
|
||||
async open () {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.socket = new WebSocket(`ws://${this.host}`);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user