fix: need to store peer, set the id the pass it to onNewPeer
This commit is contained in:
parent
5585907591
commit
7afc759ece
|
@ -319,10 +319,10 @@ export class P2PService {
|
||||||
this.logger.verbose(`[connect] ${connectionUri}`);
|
this.logger.verbose(`[connect] ${connectionUri}`);
|
||||||
|
|
||||||
const socket = await createTransportSocket(protocol, connectionUri);
|
const socket = await createTransportSocket(protocol, connectionUri);
|
||||||
await this.onNewPeer(
|
const peer = createTransportPeer(protocol, socket, [connectionUri]);
|
||||||
createTransportPeer(protocol, socket, [connectionUri]),
|
|
||||||
true,
|
peer.id = id;
|
||||||
);
|
await this.onNewPeer(peer, true);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (retried) {
|
if (retried) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue