diff --git a/internal/builds/register.go b/internal/builds/register.go index ff7bc5626860b80de1788d814ba9d5a8a9197dd0..645f3db16597956835a6cc6950da7aaba2d24bc2 100644 --- a/internal/builds/register.go +++ b/internal/builds/register.go @@ -49,7 +49,7 @@ func RegisterHandler(h http.Handler, pollingDuration time.Duration) http.Handler return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { lastUpdate := r.Header.Get("X-GitLab-Last-Update") - if lastUpdate != "" { + if lastUpdate == "" { // We could have a fail-over implementation here, for old runners, that: // Proxies the requests, if this is 204, we delay the response to client, // By checking the response from handler, and reading `X-GitLab-Last-Update`,