Skip to content

Commit

Permalink
fix: testservice not closing websocket due to wrong logout (WPB-9030) (
Browse files Browse the repository at this point in the history
…#2880)

* fix: testservice not closing websocket due to wrong logout (WPB-9030)

* Remove unused import
  • Loading branch information
mythsunwind authored Jul 16, 2024
1 parent 1abf586 commit 26a248f
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import com.wire.kalium.logic.CoreLogic
import com.wire.kalium.logic.configuration.server.ServerConfig
import com.wire.kalium.logic.data.auth.login.ProxyCredentials
import com.wire.kalium.logic.data.client.ClientType
import com.wire.kalium.logic.data.client.DeleteClientParam
import com.wire.kalium.logic.data.conversation.ClientId
import com.wire.kalium.logic.data.id.QualifiedID
import com.wire.kalium.logic.data.logout.LogoutReason
import com.wire.kalium.logic.data.user.UserAvailabilityStatus
import com.wire.kalium.logic.feature.auth.AddAuthenticatedUserUseCase
import com.wire.kalium.logic.feature.auth.AuthenticationResult
Expand Down Expand Up @@ -281,12 +281,8 @@ class InstanceService(
val result = session.currentSession()
if (result is CurrentSessionResult.Success) {
instance.coreLogic.sessionScope(result.accountInfo.userId) {
instance.clientId?.let {
runBlocking {
client.deleteClient(DeleteClientParam(instance.password, ClientId(instance.clientId)))
}
}
log.info("Instance $id: Device ${instance.clientId} removed")
log.info("Instance $id: Logout device ${instance.clientId}")
logout(reason = LogoutReason.SELF_HARD_LOGOUT, waitUntilCompletes = true)
}
}
}
Expand Down

0 comments on commit 26a248f

Please sign in to comment.