Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Fix nil error dereference #199

Merged
merged 2 commits into from
Dec 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ func (s *Sender) trySend(ctx context.Context, evt eventer) error {
for {
select {
case <-ctx.Done():
if ctx.Err() != nil {
if err = ctx.Err(); err != nil {
tab.For(ctx).Error(err)
}
return ctx.Err()
return err
default:
// try as long as the context is not dead
s.clientMu.RLock()
Expand Down