Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • S slixmpp
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 37
    • Issues 37
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • poeziopoezio
  • slixmpp
  • Merge requests
  • !35

Reset reconnect delay on manual reconnect, add delay event

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged ge0rg requested to merge ge0rg/slixmpp:fix-reconnect-2.0 into master Mar 29, 2020
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

This is just a hotfix workaround for an underlying problem. The _connect_routine code is "blocking" (in an async way) for connect_loop_wait seconds, so that a fresh-started manual reconnect will be silenty delayed. This code does the following changes:

  1. It moves the delay to before the DNS resolution (with the exponential back-off it might well be that the DNS records are changed while slixmpp is waiting).

  2. It adds a new event reconnect_delay that gets passed the number of seconds it will delay before actually reconnecting

  3. It resets the connect_loop_wait timer on a manual connect/reconnect call to fix the interactive experience.

A proper fix would replace the sleep in _connect_routine with a properly timered re-invocation of it, but I don't understand enough of asyncio for pulling off that magic, and this is actually a proper improvement. Also I tested this and it works!

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix-reconnect-2.0