mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-08-07 21:01:14 +00:00
**Remove redundant session cleanup in WebSocket error handlers**
Removed unnecessary `removeSession` calls from WebSocket `finally` blocks as they are either handled elsewhere or no longer needed. This simplifies the error handling flow and ensures consistency across WebSocket route implementations.
This commit is contained in:
@@ -151,8 +151,6 @@ fun Routing.wsSongListRoutes() {
|
|||||||
}
|
}
|
||||||
} catch (e: ClosedReceiveChannelException) {
|
} catch (e: ClosedReceiveChannelException) {
|
||||||
logger.error("Error in WebSocket: ${e.message}")
|
logger.error("Error in WebSocket: ${e.message}")
|
||||||
} finally {
|
|
||||||
removeSession(uid)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -110,8 +110,6 @@ fun Routing.wsSongRoutes() {
|
|||||||
}
|
}
|
||||||
} catch(e: ClosedReceiveChannelException) {
|
} catch(e: ClosedReceiveChannelException) {
|
||||||
logger.error("Error in WebSocket: ${e.message}")
|
logger.error("Error in WebSocket: ${e.message}")
|
||||||
} finally {
|
|
||||||
removeSession(uid, this)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -87,8 +87,6 @@ fun Routing.wsTimerRoutes() {
|
|||||||
}
|
}
|
||||||
} catch(e: ClosedReceiveChannelException) {
|
} catch(e: ClosedReceiveChannelException) {
|
||||||
logger.error("Error in WebSocket: ${e.message}")
|
logger.error("Error in WebSocket: ${e.message}")
|
||||||
} finally {
|
|
||||||
removeSession(uid, this)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user