Skip to content

Commit

Permalink
fix: [BE] 10초 이상 연결되었지만 응답받지 못한 소켓 연결 해제
Browse files Browse the repository at this point in the history
  • Loading branch information
HKLeeeee committed Dec 6, 2023
1 parent 9abfb61 commit 2657f9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backEnd/api/src/run/run.gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ export class RunGateway implements OnGatewayConnection {
handleNotCompleteSocket() {
const Before10S = Date.now() - 10000;
this.connectedSockets.forEach((value, key) => {
const { createTime } = value;
const { socket, createTime } = value;
if (createTime < Before10S) this.connectedSockets.delete(key);
socket.disconnect();
});
}
}

0 comments on commit 2657f9c

Please sign in to comment.