mirror of
https://github.com/wonli/aqi.git
synced 2025-09-26 20:51:23 +08:00
disconnect
This commit is contained in:
@@ -52,10 +52,11 @@ func (h *Hubc) Run() {
|
|||||||
c.Log("--", "connection")
|
c.Log("--", "connection")
|
||||||
|
|
||||||
case c := <-h.Disconnect:
|
case c := <-h.Disconnect:
|
||||||
|
h.PubSub.Pub("disconnect", c)
|
||||||
if c.User != nil {
|
if c.User != nil {
|
||||||
err := c.User.appLogout(c.AppId, c)
|
err := c.User.appLogout(c.AppId, c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.Log("--", "user disconnect")
|
c.Log("--", "user disconnect err:"+err.Error())
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
c.Close()
|
c.Close()
|
||||||
|
Reference in New Issue
Block a user