centrifugal / centrifuge

Real-time messaging library for Go. The simplest way to add feature-rich and scalable WebSocket support to your application. The core of Centrifugo server.

Home Page:https://pkg.go.dev/github.com/centrifugal/centrifuge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

redis presence auto extend the expiration time

larryclean opened this issue · comments

@FZambia Hi
i upgrade centrifuge to v0.9.0.
Why doesn't "redis presence data" renew automatically
I don't know what to do now.

Have you looked at v0.9.1? It has presence related fix, if it does not help - please provide more information about problem.

BTW, Also look at #129 - huge changes coming, I am removing namespaces and JWT from this lib to make it less restrictive and more extensible (but it will be possible to add the same on top of course)

i will try it. thx. This is a good idea, but I recommend that the setToken method be retained.The authentication of token is given to the user

Yes, that's the idea - I dont want to touch client-server protocol at all (and I have no plans to change it later even for v1 release if it happen) and its possibilities will be the same. Users will be able yo use own permissions and own token parsing logic on server side though.

That's how I use it now.

if e.Token == "" {
		//reply.Error = common.NewError("用户token为空")
		return
	}
	var err error
	data, err := h.TokenT.Valid(e.Token)
	if err != nil {
		reply.Disconnect = centrifuge.DisconnectInvalidToken
		return
	}

@FZambia i use centrifuge to write game server. but I want to know if a user still has a connection in channel. Do you have any good idea?

Cant say without more information, join our chat rooms in Telegram or Discord, will be nice to hear more about your use case

Closing since nothing actionable left here. @Larry-Dev please reopen with detailed description if the problem remains.