Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix private channel resubscribe deadlock #38

Merged
merged 1 commit into from
Sep 18, 2020

Conversation

FZambia
Copy link
Member

@FZambia FZambia commented Sep 18, 2020

Fixes deadlock in situation when client resubscribes and tries to get channel private signature.

#	0x1043386	sync.runtime_SemacquireMutex+0x46						/usr/local/Cellar/go/1.13/libexec/src/runtime/sema.go:71
#	0x2f819b1	sync.(*RWMutex).RLock+0xc1							/usr/local/Cellar/go/1.13/libexec/src/sync/rwmutex.go:50
#	0x2f81919	github.com/centrifugal/centrifuge-go.(*Client).clientID+0x29			/go/pkg/mod/github.com/centrifugal/centrifuge-go@v0.6.1/client.go:189
#	0x2f866ec	github.com/centrifugal/centrifuge-go.(*Client).privateSign+0x7c			/go/pkg/mod/github.com/centrifugal/centrifuge-go@v0.6.1/client.go:1133
#	0x2f8ae7b	github.com/centrifugal/centrifuge-go.(*Subscription).resubscribe+0xdb		/go/pkg/mod/github.com/centrifugal/centrifuge-go@v0.6.1/subscription.go:453
#	0x2f85799	github.com/centrifugal/centrifuge-go.(*Client).resubscribe+0xa9			/go/pkg/mod/github.com/centrifugal/centrifuge-go@v0.6.1/client.go:918
#	0x2f8e1d5	github.com/centrifugal/centrifuge-go.(*Client).connectFromScratch.func1+0x865	/go/pkg/mod/github.com/centrifugal/centrifuge-go@v0.6.1/client.go:895
#	0x2f8eb33	github.com/centrifugal/centrifuge-go.(*Client).sendConnect.func1+0x1c3		/go/pkg/mod/github.com/centrifugal/centrifuge-go@v0.6.1/client.go:1123
#	0x2f835f6	github.com/centrifugal/centrifuge-go.(*Client).handle+0x136			/go/pkg/mod/github.com/centrifugal/centrifuge-go@v0.6.1/client.go:495
#	0x2f83374	github.com/centrifugal/centrifuge-go.(*Client).readOnce+0x94			/go/pkg/mod/github.com/centrifugal/centrifuge-go@v0.6.1/client.go:467
#	0x2f83488	github.com/centrifugal/centrifuge-go.(*Client).reader+0x78			/go/pkg/mod/github.com/centrifugal/centrifuge-go@v0.6.1/client.go:477

@FZambia FZambia merged commit f81c7b0 into master Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant