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.

@yaakov-h yaakov-h added the bug label Nov 7, 2019
@yaakov-h yaakov-h added this to the 2.3.0 milestone Nov 7, 2019
@yaakov-h yaakov-h added this to To do in 2.3.0 Release via automation Nov 7, 2019
@yaakov-h yaakov-h modified the milestones: 2.3.0, 2.4.0 Mar 12, 2020
@yaakov-h yaakov-h added this to To do in 2.4.0 Release via automation Mar 12, 2020
@yaakov-h yaakov-h removed this from To do in 2.3.0 Release Mar 12, 2020
@yaakov-h yaakov-h modified the milestones: 2.4.0, 2.5.0 Nov 17, 2021
@yaakov-h yaakov-h removed this from To do in 2.4.0 Release Nov 17, 2021
@yaakov-h yaakov-h added this to To do in Things that need fixing via automation Nov 17, 2021
@xPaw xPaw modified the milestones: 2.5.0, Some day (PRs welcome) Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants