Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Improve Telegram Service Connection Handling #7619

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

devin-ai-integration[bot]
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Jan 9, 2025

Fix Telegram Service Connection Handling

This PR addresses the hanging issues in the Telegram service by implementing several improvements:

  1. Added connection timeouts (5 seconds) to prevent indefinite hanging
  2. Limited reconnection attempts (max 3) with exponential backoff
  3. Improved error handling for various connection scenarios
  4. Enhanced cleanup of resources, event handlers, and TTL management
  5. Better handling of authentication errors and session management

Changes

  • Added timeout mechanism for connection attempts
  • Implemented max reconnection attempts with backoff
  • Enhanced error handling for RPC and network errors
  • Improved resource cleanup in connection management
  • Better TTL handling for authentication flows

Testing

  • The changes have passed the telegram service tests
  • Manual testing of connection scenarios was performed
  • Error handling paths have been verified

Link to Devin run: https://app.devin.ai/sessions/50b5bb8187ef43949d01858bea76ce36

Huly®: UBERF-9089

- Add connection timeout and reconnection limits
- Improve error handling for specific scenarios
- Clean up event handlers and intervals properly
- Add proper TTL management for connections
- Prevent infinite reconnection loops
- Add exponential backoff for reconnection attempts

Co-Authored-By: [email protected] <[email protected]>
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants