topfreegames / pitaya

Scalable game server framework with clustering support and client libraries for iOS, Android, Unity and others through the C SDK.
MIT License
2.33k stars 476 forks source link

oldSession.kick() in unique_session.go causes session.Bind() to fail #220

Open kokais opened 3 years ago

kokais commented 3 years ago

In Cluster mode, the frontend service reported some bind session error: "close closed session". When session.Bind is executed, unique_session.go will execute oldSession.Kick. If oldSession is closed, it will return that error:"close closed session". So, my question is whether the "session.OnSessionBind" in unique_session.go does not need to return the error when oldSession.Kick, then session.Bind can bind the current uid normally.

bruce1125 commented 9 months ago

Doing that may cover some bugs or issues for the server. The most important thing is to locate the problem and solve it.