Skip to content

Commit 82d15cb

Browse files
DavidS-ovmactions-user
authored andcommitted
Minor fixes (#932)
A small set of cleanups to improve debugging and testing. This fixes one of the internal panics from https://github.com/overmindtech/workspace/actions/runs/13972884538/job/39119706273 GitOrigin-RevId: 4b3f7aebe90aad45c5aa09541b31e7bbe97cdb9f
1 parent f6f9c65 commit 82d15cb

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

auth/nats.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ var ReconnectHandlerDefault = func(c *nats.Conn) {
5050
var ClosedHandlerDefault = func(c *nats.Conn) {
5151
fields := log.Fields{}
5252

53-
if c != nil {
53+
if c != nil && c.LastError() != nil {
5454
fields["error"] = c.LastError()
5555
}
5656

sdp-go/progress.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,10 @@ type SourceQueryProgress struct {
275275
// Responders that failed
276276
Error int
277277

278-
// Responders that were cancelled. When cancelling the QueryProgress does
279-
// not wait for responders to acknowledge the cancellation, it simply sends
280-
// the message and marks all responders that are currently "working" as
281-
// "cancelled". It is possible that a responder will self-report
278+
// Responders that were cancelled. When cancelling the SourceQueryProgress
279+
// does not wait for responders to acknowledge the cancellation, it simply
280+
// sends the message and marks all responders that are currently "working"
281+
// as "cancelled". It is possible that a responder will self-report
282282
// cancellation, but given the timings this is unlikely as it would need to
283283
// be very fast
284284
Cancelled int
@@ -287,7 +287,7 @@ type SourceQueryProgress struct {
287287
Responders int
288288
}
289289

290-
// RunSourceQuery returns a pointer to a QueryProgress object with the various
290+
// RunSourceQuery returns a pointer to a SourceQuery object with the various
291291
// internal members initialized. A startTimeout must also be provided, feel free
292292
// to use `DefaultStartTimeout` if you don't have a specific value in mind.
293293
func RunSourceQuery(ctx context.Context, query *Query, startTimeout time.Duration, ec EncodedConnection, responseChan chan<- *QueryResponse) (*SourceQuery, error) {

0 commit comments

Comments
 (0)