Add unregistering on telegram conn close

This commit is contained in:
9seconds
2019-10-10 16:42:29 +03:00
parent 61450ea3db
commit 2eba78b0db
2 changed files with 10 additions and 1 deletions
+3
View File
@@ -54,6 +54,9 @@ func (h *hub) getHub(req *protocol.TelegramRequest) *connectionHub {
rv, ok = h.subs[key]
if !ok {
h.logger.Debugw("Create new connection hub",
"dc", req.ClientProtocol.DC(),
"protocol", req.ClientProtocol.ConnectionProtocol())
rv = newConnectionHub(h.logger.With(
"dc", req.ClientProtocol.DC(),
"protocol", req.ClientProtocol.ConnectionProtocol(),