Skip to content

Commit

Permalink
Merge pull request #194 from inovex/reduce-outlook-memory-usage
Browse files Browse the repository at this point in the history
outlook: fix temporary memory leak while listing events
  • Loading branch information
MichaelEischer authored Jan 7, 2025
2 parents 8b8c93f + bd9f0b2 commit 6ea591b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/adapter/outlook_http/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (o *OutlookClient) ListEvents(ctx context.Context, start time.Time, end tim
}

body, _ := io.ReadAll(resp.Body)
defer resp.Body.Close()
resp.Body.Close()

var eventList EventList
err = json.Unmarshal(body, &eventList)
Expand All @@ -70,7 +70,7 @@ func (o *OutlookClient) ListEvents(ctx context.Context, start time.Time, end tim
}

body, _ := io.ReadAll(resp.Body)
defer resp.Body.Close()
resp.Body.Close()

var nextList EventList
err = json.Unmarshal(body, &nextList)
Expand Down

0 comments on commit 6ea591b

Please sign in to comment.