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

OnServerSubscribe never called #63

Closed
j178 opened this issue Jun 29, 2022 · 0 comments · Fixed by #64
Closed

OnServerSubscribe never called #63

j178 opened this issue Jun 29, 2022 · 0 comments · Fixed by #64

Comments

@j178
Copy link
Contributor

j178 commented Jun 29, 2022

centrifuge-go/client.go

Lines 670 to 684 in 2d1f952

func (c *Client) handleServerSub(channel string, sub *protocol.Subscribe) error {
c.mu.Lock()
_, ok := c.serverSubs[channel]
if ok {
return nil
}
c.serverSubs[channel] = &serverSub{
Offset: sub.Offset,
Epoch: sub.Epoch,
Recoverable: sub.Recoverable,
}
c.mu.Unlock()
if !ok {
return nil
}

In the line 682-684, if this a new server side subscribe event, then handleServerSub just returns, without calling custom OnServerSubscribe handler.

@j178 j178 changed the title OnServerSubscribe/OnServerUnsubscribe never called OnServerSubscribe never called Jun 29, 2022
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 a pull request may close this issue.

1 participant