Remove excessive listener that caused stucking after 1000 updates

This commit is contained in:
bodqhrohro 2019-12-30 23:26:23 +02:00
parent 7ea5e9ac73
commit 33e564c62e
2 changed files with 1 additions and 4 deletions

View file

@ -41,7 +41,6 @@ type Client struct {
parameters *client.TdlibParameters parameters *client.TdlibParameters
options []client.Option options []client.Option
me *client.User me *client.User
listener *client.Listener
xmpp *xmpp.Component xmpp *xmpp.Component
jid string jid string

View file

@ -116,7 +116,6 @@ func (c *Client) Connect() error {
} }
c.client = tdlibClient c.client = tdlibClient
c.listener = tdlibClient.GetListener()
c.locks.authorizationReady.Done() c.locks.authorizationReady.Done()
c.online = true c.online = true
@ -211,12 +210,11 @@ func (c *Client) interactor() {
} }
func (c *Client) forceClose() { func (c *Client) forceClose() {
//c.listener.Close()
c.online = false c.online = false
c.authorizer = nil c.authorizer = nil
} }
// Online checks if the updates listener is alive // Online checks if the updates listener is alive
func (c *Client) Online() bool { func (c *Client) Online() bool {
return c.listener != nil && c.online //c.listener.IsActive() return c.online
} }