Currently, RouteHandler calls app.ClientExists(), locking the client map. If the client is connected, the handler calls server.Update(), which re-locks the map to retrieve the client. We can add Server.UpdateClient(c *Client, chid, uid string, vers int64, time time.Time, data string) to avoid reacquiring the lock.
Currently,
RouteHandler
callsapp.ClientExists()
, locking the client map. If the client is connected, the handler callsserver.Update()
, which re-locks the map to retrieve the client. We can addServer.UpdateClient(c *Client, chid, uid string, vers int64, time time.Time, data string)
to avoid reacquiring the lock.Noted by @bbangert on IRC; related to #154.