Gajim hangs after IP address change
Precondition:
- Gajim running and connected to Jabber server.
How to reproduce:
- Delete old IP address used by Gajim connections,
- Assign new IP address and default routing which allows to connect to the same server.
Expected:
- Gajim reconnects to a server.
Observed:
-
Gajim does not respond to any action (e.g. trayicon click) and still tries to use old sockets. Strace output below:
gettimeofday({1186582452, 208953}, NULL) = 0 poll([{fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=12, events=POLLIN|POLLPRI}, {fd=4, events=POLLIN|POLLPRI}, {fd=5, events=POLLIN|POLLPRI}, {fd=14, events=POLLIN|POLLPRI}, {fd=3, events=POLLIN|POLLPRI}, {fd=19, events=POLLIN}, {fd=21, events=POLLIN}, {fd=24, events=POLLIN|POLLPRI}], 10, 115) = 0 gettimeofday({1186582452, 324887}, NULL) = 0 gettimeofday({1186582452, 324984}, NULL) = 0 read(6, 0x82e5f60, 4096) = -1 EAGAIN (Resource temporarily unavailable)
Proposed solution:
- Add some timeout for connections which return EAGAIN permanently. After this timeout, Gajim should try to drop connection and inform about an error (or reconnect if auto-reconnect option is set).