*Bug fix channel opening
This commit is contained in:
parent
21f7f2e67d
commit
f82a689e0f
|
@ -92,7 +92,7 @@ export default class DHTFlood extends EventEmitter {
|
|||
|
||||
const self = this;
|
||||
|
||||
if (!mux.opened({ protocol: PROTOCOL })) {
|
||||
if (!mux.opened({ protocol: this.protocol })) {
|
||||
chan = mux.createChannel({
|
||||
protocol: this.protocol,
|
||||
async onopen() {
|
||||
|
@ -102,8 +102,10 @@ export default class DHTFlood extends EventEmitter {
|
|||
self.emit("peer-remove", peer);
|
||||
},
|
||||
});
|
||||
if (chan) {
|
||||
peer[FLOOD_SYMBOL] = chan;
|
||||
}
|
||||
}
|
||||
|
||||
chan = peer[FLOOD_SYMBOL];
|
||||
|
||||
|
|
Loading…
Reference in New Issue