Skip to content

Commit 993bc29

Browse files
Mempool monitor: fix request with context
1 parent 82af318 commit 993bc29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

node/monitor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func (monitor *Monitor) process(ctx context.Context, filter, url string) error {
162162

163163
func (monitor *Monitor) longPollingApplied(ctx context.Context, url string, ch chan []*Applied) error {
164164
link := fmt.Sprintf("%s/%s", monitor.url, url)
165-
req, err := http.NewRequest(http.MethodGet, link, nil)
165+
req, err := http.NewRequestWithContext(ctx, http.MethodGet, link, nil)
166166
if err != nil {
167167
return err
168168
}
@@ -209,7 +209,7 @@ func (monitor *Monitor) parseLongPollingAppliedResponse(ctx context.Context, res
209209

210210
func (monitor *Monitor) longPollingFailed(ctx context.Context, url string, ch chan []*FailedMonitor) error {
211211
link := fmt.Sprintf("%s/%s", monitor.url, url)
212-
req, err := http.NewRequest(http.MethodGet, link, nil)
212+
req, err := http.NewRequestWithContext(ctx, http.MethodGet, link, nil)
213213
if err != nil {
214214
return err
215215
}

0 commit comments

Comments
 (0)