Skip to content

Commit caf9c41

Browse files
authored
fix: Stop sending before logs when after is specified (#2585)
This fixes duplicate logs appearing in completed jos!
1 parent 437066c commit caf9c41

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

coderd/provisionerjobs.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ func (api *API) provisionerJobLogs(rw http.ResponseWriter, r *http.Request, job
7272
}
7373
before = time.UnixMilli(beforeMS)
7474
} else {
75-
before = database.Now()
75+
// If we're following, we don't want logs before a timestamp!
76+
if !follow {
77+
before = database.Now()
78+
}
7679
}
7780

7881
if !follow {

0 commit comments

Comments
 (0)