| Index: common/gcloud/pubsub/subscriber/subscriber.go
|
| diff --git a/common/gcloud/pubsub/subscriber/subscriber.go b/common/gcloud/pubsub/subscriber/subscriber.go
|
| index 53300d8594ceb362a786edaf8bfdb0e3869dcb76..8a6d1cd0150d80465efff2e7548814c83894e850 100644
|
| --- a/common/gcloud/pubsub/subscriber/subscriber.go
|
| +++ b/common/gcloud/pubsub/subscriber/subscriber.go
|
| @@ -164,18 +164,5 @@ func (s *Subscriber) noDataSleep(c context.Context) {
|
| if d <= 0 {
|
| d = DefaultNoDataDelay
|
| }
|
| - cancellableSleep(c, d)
|
| -}
|
| -
|
| -// cancellableSleep sleeps, returning either when the sleep duration has expired
|
| -// or the supplied context has been canceled.
|
| -func cancellableSleep(c context.Context, delay time.Duration) {
|
| - // Sleep for "delay", stopping early if our Context is canceled.
|
| - select {
|
| - case <-clock.After(c, delay):
|
| - break
|
| -
|
| - case <-c.Done():
|
| - break
|
| - }
|
| + clock.CancelSleep(c, d)
|
| }
|
|
|