Project

General

Profile

Bug #3432

Unable to recoonect after disconnection

Added by ondrejj 5 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
2018-12-16
Due date:
% Done:

0%

Estimated time:
Version:

Description

After a perod of time I am always disconnected from google xmpp server. I have to manually quit my application and restart it to reconnect. When trying to start connection again, it's blocked. Here is a traceback:

~/bin/termijab.py in process(self)                                     [14/3200]
    506       callback = lambda _: self.connected_event.set()                  
    507       self.add_event_handler('session_start', callback)                
--> 508       self.loop.run_until_complete(self.connected_event.wait())        
    509       def process_thread():
    510           while not self.quit:

/usr/lib64/python3.7/asyncio/base_events.py in run_until_complete(self, future)
    558         future.add_done_callback(_run_until_complete_cb)               
    559         try:                                                           
--> 560             self.run_forever()                                         
    561         except:
    562             if new_task and future.done() and not future.cancelled():  

/usr/lib64/python3.7/asyncio/base_events.py in run_forever(self)               
    526             events._set_running_loop(self)                             
    527             while True:
--> 528                 self._run_once()
    529                 if self._stopping:
    530                     break

/usr/lib64/python3.7/asyncio/base_events.py in _run_once(self)
   1726                            timeout * 1e3, dt * 1e3)
   1727         else:
-> 1728             event_list = self._selector.select(timeout)
   1729         self._process_events(event_list)
   1730

/usr/lib64/python3.7/selectors.py in select(self, timeout)
    466             ready = []
    467             try:
--> 468                 fd_event_list = self._selector.poll(timeout, max_ev)
    469             except InterruptedError:
    470                 return ready

Looks like there is some problem with disconnect, also when trying to disconnect multiple times, it's still freeze my app.

And also an automatic reconnect would be nice.

Also available in: Atom PDF