Skip to content

Commit

Permalink
chore(socketio): remove duplicate event handler (frappe#18770) (frapp…
Browse files Browse the repository at this point in the history
…e#18774)

(cherry picked from commit ff0c820)

Co-authored-by: Sagar Vora <sagar@resilient.tech>
  • Loading branch information
mergify[bot] and sagarvora authored Nov 5, 2022
1 parent a3fe0dc commit 9b507f8
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions socketio.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ io.on("connection", function (socket) {

socket.user = cookie.parse(socket.request.headers.cookie).user_id;

socket.on("task_subscribe", function (task_id) {
var room = get_task_room(socket, task_id);
socket.join(room);
});

let retries = 0;
let join_user_room = () => {
request
Expand All @@ -61,13 +56,13 @@ io.on("connection", function (socket) {

join_user_room();

socket.on("task_unsubscribe", function (task_id) {
socket.on("task_subscribe", function (task_id) {
var room = get_task_room(socket, task_id);
socket.leave(room);
socket.join(room);
});

socket.on("task_unsubscribe", function (task_id) {
var room = "task:" + task_id;
var room = get_task_room(socket, task_id);
socket.leave(room);
});

Expand Down

0 comments on commit 9b507f8

Please sign in to comment.