centrifugal/centrifuge-go

OnServerSubscribe never called

j178 opened this issue · 0 comments

j178 commented

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.