We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a172096 commit 9ba22c0Copy full SHA for 9ba22c0
src/clients/PeerClient.js
@@ -83,16 +83,11 @@ export default class PeerClient {
83
// signaling server needs us to seed
84
// we will connected to a given room
85
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
- );
+
+ room.on("participant", participant => {
+ // send the response
+ participant.send(response);
+ });
96
}
97
98
createRoomId() {
0 commit comments