Skip to content

Commit 118a960

Browse files
authored
fix: only close the rpcSpan once (#2121)
1 parent d8cd0e7 commit 118a960

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/publisher/message-queues.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,10 @@ export abstract class MessageQueue extends EventEmitter {
172172

173173
throw e;
174174
} finally {
175+
rpcSpan?.end();
175176
messages.forEach(m => {
176177
// We're finished with both the RPC and the whole publish operation,
177178
// so close out all of the related spans.
178-
rpcSpan?.end();
179179
tracing.PubsubEvents.publishEnd(m);
180180
m.parentSpan?.end();
181181
});

0 commit comments

Comments
 (0)