Philipp15b / go-steam

Steam's protocol in Go to allow automation of different actions on the Steam network without running an actual Steam client. Includes APIs for friends, chatting, trading, trade offers and TF2 crafting.
https://pkg.go.dev/github.com/Philipp15b/go-steam/v3
Other
388 stars 131 forks source link

Why connect methods os.Exit on error? #53

Closed YellowOrWhite closed 8 years ago

YellowOrWhite commented 8 years ago

It is very strange that connect methods do not return error. It is not possible to run multiple concurrent clients when any one of them can just os.Exit whole process. Is there any particular reason for such design?

YellowOrWhite commented 8 years ago

One alternative is to emit FatalErrorEvent. It does not break backward compatibility, makes it easier to implement reconnect logic and also removes dependency on log package which is only used in connect methods.

Philipp15b commented 8 years ago

Fixed by #51.