(dur time.Duration)
| 1065 | } |
| 1066 | |
| 1067 | func (s *pullSubscription) scheduleHeartbeatCheck(dur time.Duration) *hbMonitor { |
| 1068 | if dur == 0 { |
| 1069 | return nil |
| 1070 | } |
| 1071 | return &hbMonitor{ |
| 1072 | timer: time.AfterFunc(2*dur, func() { |
| 1073 | s.errs <- ErrNoHeartbeat |
| 1074 | }), |
| 1075 | } |
| 1076 | } |
| 1077 | |
| 1078 | func (s *pullSubscription) cleanup() { |
| 1079 | // For now this function does not need to hold the lock. |