Session: Fixed a panic bug when the gateway fails

This commit is contained in:
diamondburned (Forefront) 2020-06-29 11:00:07 -07:00
parent 01021f0902
commit 16ed406c53
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ func New(token string) (*Session, error) {
// Create a gateway
g, err := gateway.NewGateway(token)
if err != nil {
err = errors.Wrap(err, "failed to connect to Gateway")
return nil, errors.Wrap(err, "failed to connect to Gateway")
}
return NewWithGateway(g), err