Skip to content

Commit

Permalink
chore(socketio): remove duplicate event handler (frappe#18770)
Browse files Browse the repository at this point in the history
  • Loading branch information
sagarvora authored Nov 5, 2022
1 parent cd1bbcc commit ff0c820
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 ff0c820

Please sign in to comment.