Skip to content

Commit

Permalink
new: forward error when Subscriber discarded a message
Browse files Browse the repository at this point in the history
  • Loading branch information
primalmotion committed Dec 13, 2018
1 parent 0f8f6e2 commit c430ce8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/push/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"crypto/tls"
"encoding/json"
"fmt"
"net/http"
"sync"
"time"
Expand All @@ -16,7 +17,7 @@ import (
)

const (
eventChSize = 1024
eventChSize = 2048
errorChSize = 64
statusChSize = 8
filterChSize = 2
Expand Down Expand Up @@ -210,6 +211,7 @@ func (s *subscription) publishEvent(evt *elemental.Event) {
select {
case s.events <- evt:
default:
s.publishError(fmt.Errorf("unable to forward event: channel full"))
}
}

Expand Down

0 comments on commit c430ce8

Please sign in to comment.