Skip to content

Commit 6ca5d79

Browse files
committed
fix : set sse completion when closed QUZ-113
1 parent 7b27c2d commit 6ca5d79

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

matching-service/matching-application/app-api/src/main/kotlin/com/grepp/quizy/matching/api/sse/SseConnector.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class SseConnector(
3434
}
3535

3636
fun disconnect(userId: UserId) {
37+
emitterRepository.findById(userId.value)?.complete()
3738
emitterRepository.remove(userId.value)
3839
matchingPoolManager.remove(userId)
3940
}

matching-service/matching-application/app-api/src/main/kotlin/com/grepp/quizy/matching/api/sse/SseSender.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class SseSender(
3333
}
3434

3535
private fun closeEmitter(userId: Long) {
36+
emitterRepository.findById(userId)?.complete()
3637
emitterRepository.remove(userId)
3738
matchingPoolManager.remove(UserId(userId))
3839
}

0 commit comments

Comments
 (0)