Skip to content

CqlClientConnection.Close() blocked forever #55

@joao-r-reis

Description

@joao-r-reis

I believe this issue is a bit different from #36 and #38 because the blocked channel here is not the same as #38 .
Close() sets outgoing channel to nil and in the outgoingLoop if the channel becomes nil just before the loop tries to read from that channel, it will be blocked forever.

There's a check to see if the connection is closed just before that read but there's no locking involved so I believe this issue can occur. I saw this happen in a Github Action so I couldn't see exactly where the goroutines were blocked but looking at the logs I believe this is what happened.

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