aboutsummaryrefslogtreecommitdiff
path: root/telegram
diff options
context:
space:
mode:
authorbodqhrohro <bodqhrohro@gmail.com>2019-12-31 00:26:23 +0300
committerbodqhrohro <bodqhrohro@gmail.com>2019-12-31 00:26:23 +0300
commit33e564c62ee6ddcd54a295445ffbfb60e50c5b98 (patch)
tree43aee768f6f871907315745edb9bebc8e595eeee /telegram
parent7ea5e9ac73199f264961e5d9845f302b41108e13 (diff)
Remove excessive listener that caused stucking after 1000 updates
Diffstat (limited to 'telegram')
-rw-r--r--telegram/client.go1
-rw-r--r--telegram/connect.go4
2 files changed, 1 insertions, 4 deletions
diff --git a/telegram/client.go b/telegram/client.go
index 7e7cdc8..2b122f8 100644
--- a/telegram/client.go
+++ b/telegram/client.go
@@ -41,7 +41,6 @@ type Client struct {
parameters *client.TdlibParameters
options []client.Option
me *client.User
- listener *client.Listener
xmpp *xmpp.Component
jid string
diff --git a/telegram/connect.go b/telegram/connect.go
index f367370..e19bda3 100644
--- a/telegram/connect.go
+++ b/telegram/connect.go
@@ -116,7 +116,6 @@ func (c *Client) Connect() error {
}
c.client = tdlibClient
- c.listener = tdlibClient.GetListener()
c.locks.authorizationReady.Done()
c.online = true
@@ -211,12 +210,11 @@ func (c *Client) interactor() {
}
func (c *Client) forceClose() {
- //c.listener.Close()
c.online = false
c.authorizer = nil
}
// Online checks if the updates listener is alive
func (c *Client) Online() bool {
- return c.listener != nil && c.online //c.listener.IsActive()
+ return c.online
}