mirror of
https://github.com/jech/galene.git
synced 2024-11-22 08:35:57 +01:00
Make some errors non-fatal.
Don't disconnect the client for some more errors.
This commit is contained in:
parent
056f98604a
commit
cc52e39ce4
1 changed files with 3 additions and 3 deletions
|
@ -1393,7 +1393,7 @@ func handleClientMessage(c *webClient, m clientMessage) error {
|
||||||
case "join":
|
case "join":
|
||||||
if m.Kind == "leave" {
|
if m.Kind == "leave" {
|
||||||
if c.group == nil || c.group.Name() != m.Group {
|
if c.group == nil || c.group.Name() != m.Group {
|
||||||
return group.ProtocolError("you are not joined")
|
return group.UserError("you are not joined")
|
||||||
}
|
}
|
||||||
leaveGroup(c)
|
leaveGroup(c)
|
||||||
}
|
}
|
||||||
|
@ -1691,7 +1691,7 @@ func handleClientMessage(c *webClient, m clientMessage) error {
|
||||||
}
|
}
|
||||||
g.UpdateData(data)
|
g.UpdateData(data)
|
||||||
default:
|
default:
|
||||||
return group.ProtocolError("unknown group action")
|
return group.UserError("unknown group action")
|
||||||
}
|
}
|
||||||
case "useraction":
|
case "useraction":
|
||||||
g := c.group
|
g := c.group
|
||||||
|
@ -1753,7 +1753,7 @@ func handleClientMessage(c *webClient, m clientMessage) error {
|
||||||
}
|
}
|
||||||
}(g.GetClients(nil))
|
}(g.GetClients(nil))
|
||||||
default:
|
default:
|
||||||
return group.ProtocolError("unknown user action")
|
return group.UserError("unknown user action")
|
||||||
}
|
}
|
||||||
case "pong":
|
case "pong":
|
||||||
// nothing
|
// nothing
|
||||||
|
|
Loading…
Reference in a new issue