Skip to content

Commit 9ba22c0

Browse files
committed
Update peer plugin
1 parent a172096 commit 9ba22c0

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/clients/PeerClient.js

+5-10
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,11 @@ export default class PeerClient {
8383
// signaling server needs us to seed
8484
// we will connected to a given room
8585
const room = this.peerData.connect(roomId);
86-
room.on("participant", (participant) =>
87-
participant.then(function (peer) {
88-
//this peer disconnected from room
89-
peer.on("disconnected", function () {
90-
room.disconnect();
91-
});
92-
// send the response
93-
peer.send(response);
94-
})
95-
);
86+
87+
room.on("participant", participant => {
88+
// send the response
89+
participant.send(response);
90+
});
9691
}
9792

9893
createRoomId() {

0 commit comments

Comments
 (0)