Skip to content

Websocket pingPonger not called before first .Send() #165

Closed
@LandonTClipp

Description

@LandonTClipp

In the example here, it configures the pingPonger as part of the ConnConfigurer. The ConnConfigurer only gets called on the first .Send(), which means that if the websocket connection is established but the server sends no data (which is often a legitimate situation if there is genuinely no data to send), then the pingPonger is never started, which means the connection becomes stale.

Is there an alternative solution to this that people would recommend? I initially thought that we could start the pingPonger as part of the upgrader, but it seems this also suffers from the same issue of only being called on the first .Send(). I thought it would be worth it to ask if anyone else has a solution that has worked for them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions