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

Attempting to connect to another cm not connecting #446

Open
3 tasks done
Tom-jm03 opened this issue Jan 12, 2024 · 1 comment
Open
3 tasks done

Attempting to connect to another cm not connecting #446

Tom-jm03 opened this issue Jan 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Tom-jm03
Copy link

Summary

The steam client keeps spamming that it is trying to reconnect but nothing happens.

Reproduction Steps

                    try:
                        await bot.start(discord_token, username, password)
                    except KeyboardInterrupt:
                        await bot.close()
                    except steam.gateway.ConnectionClosed:
                        logger.error("[-] Steam gateway error. Reconnecting...")
                        while True:
                            try:
                                await asyncio.sleep(10)
                                await bot.start(discord_token, username, password)
                            except steam.gateway.ConnectionClosed:
                                logger.error("[-] Steam gateway error. Reconnecting...")
                            else:
                                break

Using this code and blocking the network connection from my server, the bot can't reconnect after unblocking the connection.
It just keeps spamming Attempting to connect to another CM in 12s, even after the network connection is reestablished.

Expected Results

I expected the client to resume the connection, after the network is back.

Actual Results

The bot hangs in a Attempting to connect state.

System Information

python version: 3.11.0
steam.py version: 1.0.0
aiohttp version: 3.8.5
betterproto version: 2.0.0b6
operating system info: Windows-10-10.0.22621-SP0

Checklist

  • I have searched the issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my username, password, shared/identity secrets and refresh/access tokens from display, if visible.
@Tom-jm03 Tom-jm03 added the bug Something isn't working label Jan 12, 2024
@Tom-jm03 Tom-jm03 changed the title Attempting to connect to another cm not connectin Attempting to connect to another cm not connecting Jan 12, 2024
@Tom-jm03
Copy link
Author

Tom-jm03 commented Feb 21, 2024

I came up with a temporary solution/workarround:

except steam.errors.NoCMsFound:
    sys.exit(1)
except steam.errors.LoginError:
    sys.exit(1)

As I'm running my bot in a docker container, this causes the container to stop.
I've defined in my docker-compose file, that the container restarts, if it fails.

Gobot1234 added a commit that referenced this issue Oct 5, 2024
Gobot1234 added a commit that referenced this issue Dec 9, 2024
* Work on connection issues

hi #570 #207 and #446

* Remove debug prints

* Make sure to dispatch ready
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant