Skip to content

Commit

Permalink
Check for nil client/syncmanager before requesting history
Browse files Browse the repository at this point in the history
Needed here because this method gets fired off in background goroutines
meaning they might be nil-ed by the time it executes.
  • Loading branch information
Fizzadar committed Feb 12, 2025
1 parent 0fffc12 commit 26ad0c0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/connector/backfill.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ func (m *MetaClient) handleUpdateExistingMessageRange(tk handlerParams, rng *tab
}

func (m *MetaClient) requestMoreHistory(ctx context.Context, threadID, minTimestampMS int64, minMessageID string) bool {
if m.Client == nil || m.Client.SyncManager == nil {
return false
}
resp, err := m.Client.ExecuteTasks(&socket.FetchMessagesTask{
ThreadKey: threadID,
Direction: 0,
Expand Down

0 comments on commit 26ad0c0

Please sign in to comment.