Skip to content

Commit

Permalink
Merge branch 'Ajout-SSE' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
enzofrnt committed Jan 31, 2024
2 parents 9a3f962 + a4cd3fb commit 1273780
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/front-vue/src/components/roomDetail/roomDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,11 @@ export default {
this.apiBaseUrl = apiIp;
await this.loadData(this.duration);
if (sseClient){
sseClient.disconnect();
sseClient.off()
}
sseClient = this.$sse.create({
url: `${this.apiBaseUrl}/Events/Data/${this.room}/`,
format: 'json',
Expand Down Expand Up @@ -407,6 +412,7 @@ export default {
},
beforeDestroy() {
sseClient.disconnect();
sseClient.off()
},
};
Expand Down

0 comments on commit 1273780

Please sign in to comment.