mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-30 08:53:08 +01:00
WebSockets: avoid duplicated node+addr hash function in JS code
This commit is contained in:
parent
22199e8845
commit
feeda2c19d
3 changed files with 10 additions and 4 deletions
|
|
@ -18,6 +18,10 @@
|
|||
|
||||
const JSON_INF = 1.0e+128;
|
||||
|
||||
export function nodeAddressHash(node, addr) {
|
||||
return [node].concat(addr).join('_');
|
||||
}
|
||||
|
||||
export class MessageChannel {
|
||||
|
||||
constructor (host) {
|
||||
|
|
@ -95,7 +99,7 @@ export class Message {
|
|||
}
|
||||
|
||||
get hash () {
|
||||
return [this.node].concat(this.addr).join('_');
|
||||
return nodeAddressHash(this.node, this.addr);
|
||||
}
|
||||
|
||||
toString () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue