diff --git a/ktor-server/ktor-server-core/jvm/src/io/ktor/sessions/SessionTrackerById.kt b/ktor-server/ktor-server-core/jvm/src/io/ktor/sessions/SessionTrackerById.kt index f32d67ec75f..aa7b293dad6 100644 --- a/ktor-server/ktor-server-core/jvm/src/io/ktor/sessions/SessionTrackerById.kt +++ b/ktor-server/ktor-server-core/jvm/src/io/ktor/sessions/SessionTrackerById.kt @@ -85,8 +85,8 @@ public class SessionTrackerById( ) } - // we remove the wrong session identifier if no related session found - call.attributes.put(sessionIdKey, sessionId) + // Remove the wrong session identifier if no related session was found + call.attributes.remove(sessionIdKey) return null }