We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c2cd2b4 + 2f05e80 commit 7232ab6Copy full SHA for 7232ab6
packages/webrtc/src/webrtc.ts
@@ -24,6 +24,8 @@ function webrtc(config: WebRTCConfig = {}): KalmTransport {
24
activeNode.on('signal', signal => {
25
if (signal.type === 'offer') emitter.emit('ready', signal);
26
});
27
+
28
+ if (config.peers) config.peers.forEach(peer => negociate({ peer }));
29
}
30
31
function negociate(event: any) {
@@ -72,8 +74,6 @@ function webrtc(config: WebRTCConfig = {}): KalmTransport {
72
74
if (handle) handle.destroy();
73
75
76
- if (config.peers) config.peers.forEach(peer => negociate({ peer }));
-
77
return {
78
bind,
79
connect,
0 commit comments