Skip to content

Commit

Permalink
Fix order of close and signout
Browse files Browse the repository at this point in the history
  • Loading branch information
yixinglu committed Sep 24, 2019
1 parent e891a89 commit f85ab41
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,14 @@ func (client *GraphClient) Connect(username, password string) error {
}

// Close transport and signout
func (client *GraphClient) Disconnect() error {
func (client *GraphClient) Disconnect() {
if err := client.graph.Signout(client.sessionID); err != nil {
log.Println("Fail to signout")
}

if err := client.graph.Close(); err != nil {
return err
log.Println("Fail to close transport")
}
return client.graph.Signout(client.sessionID)
}

func (client *GraphClient) Execute(stmt string) (*graph.ExecutionResponse, error) {
Expand Down

0 comments on commit f85ab41

Please sign in to comment.