Skip to content

Exception on server side leaves dangling client #506

@neworld

Description

@neworld

Describe the bug
Consider server code:

routing {
    rpc("rpc") {
        error("Random error for what ever reason")
        registerService<Main> { MainService() 
    }

When service access dangles forever.

val rpcClient = client.rpc { ... }
val mainService = rpcClient.withService<Main>()
mainService.checkStatus() // <-- It is a suspend function

Expected behavior

Cancellation exception from checkStatus()

Additional context
Version: 0.10.0

The WS connection was closed immediately without any message to the client

Image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions