rpcclient: Fix ws-reader hang on sending a response #1
No reviewers
Labels
No labels
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/neoneo-go#1
Loading…
Reference in a new issue
No description provided.
Delete branch "aarifullin/neoneo-go:fix/wsreader_hang"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
wsReader
may get blocked on sending to the response channel if receiver can't read the response out.wsWriter
goroutine got an error orwsClient
is going to get shut down, thenwsReader
should stop trying to send the response as it's not reasonable and this leads only to blocking.10c8492276
to25eb7f9bd5
@ -605,0 +606,4 @@
connCloseErr = fmt.Errorf("response won't be sent to channel %d: ws-writer is done", id)
break readloop
case <-c.shutdown:
connCloseErr = fmt.Errorf("response won't be sent to channel %d: shutting down", id)
This will overwrite the previous connection error.
I think if any of this is done, the connection error already exists and is descriptive.
Removed
25eb7f9bd5
to5481339d69
aarifullin referenced this pull request from TrueCloudLab/frostfs-node2024-07-26 11:23:03 +00:00