machester4/vupc

just report a bug

jht5945 opened this issue · 0 comments

diff --git a/app/src/views/Share.vue b/app/src/views/Share.vue
index 7e62d1e..506066a 100644
--- a/app/src/views/Share.vue
+++ b/app/src/views/Share.vue
@@ -27,7 +27,7 @@ export default {
       const screen = this.$route.params.screen;
       this.rtcInstance = await createOffer(screen);
       this.rtcInstance.onConnect(this.onConnect);
-      this.rtcInstance.onConnect(this.onDisconnect);
+      this.rtcInstance.onClose(this.onDisconnect);
       this.rtcInstance.onCode(this.onCode);
       this.rtcInstance.onData(this.onData);
     } catch (error) {