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

Silent disconnect when a handler throws #786

Open
xPaw opened this issue Nov 7, 2019 · 1 comment
Open

Silent disconnect when a handler throws #786

xPaw opened this issue Nov 7, 2019 · 1 comment

Comments

@xPaw
Copy link
Member

xPaw commented Nov 7, 2019

LogDebug( "SteamClient", "Unhandled '{0}' exception from '{1}' handler: '{2}'", ex.GetType().Name, key.Name, ex.Message );
Disconnect();

I couldn't figure out what was happening last time this happened because it silently logs the exception into the debug log (with no stacktrace) and just disconnects.

This time I had debug log enabled and got this:

18:01:12 [DEBUG] FreeLicense: Received free license: OK (5 apps: 375750, 1077600, 797410, 517630, 517630, 3 packages: 407024, 409937, 410395)
18:01:12 [STEAMKIT] SteamClient: Unhandled 'ArgumentException' exception from 'SteamApps' handler: 'An item with the same key has already been added. Key: 517630'

After that, SK2 started to constantly keep disconnecting with the same message (but without freelicense grant this time). Which eventually got me rate limited by the CM.

@xPaw
Copy link
Member Author

xPaw commented Nov 7, 2019

Repro:

Steam.Instance.Apps.PICSGetAccessTokens(new System.Collections.Generic.List<uint>() { 440, 440 }, Enumerable.Empty<uint>());

EDIT: I created #787 to fix the exception in the handler.

However if a handler throws, it shouldn't just eat it into debuglog and silently disconnect. This needs to be improved.

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

No branches or pull requests

2 participants