mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-11-27 09:12:53 +00:00
Session: Fixed a panic bug when the gateway fails
This commit is contained in:
parent
01021f0902
commit
16ed406c53
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue