**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:
dalbodeule 2025-04-24 14:51:28 +09:00
parent c2bb653ee1
commit 83cb68b63f
No known key found for this signature in database
GPG Key ID: EFA860D069C9FA65
3 changed files with 0 additions and 6 deletions

View File

@ -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)
} }
} }

View File

@ -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)
} }
} }

View File

@ -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)
} }
} }