Skip to content

Commit b99dd76

Browse files
Merge pull request #107591 from ankur021188/main
Added defer sender.Close(context.TODO()) in SendMessageBatch function
2 parents 5ce0438 + 5d4fd20 commit b99dd76

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

articles/service-bus-messaging/service-bus-go-how-to-use-queues.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ func SendMessageBatch(messages []string, client *azservicebus.Client) {
109109
if err != nil {
110110
panic(err)
111111
}
112-
112+
defer sender.Close(context.TODO())
113+
113114
batch, err := sender.NewMessageBatch(context.TODO(), nil)
114115
if err != nil {
115116
panic(err)

0 commit comments

Comments
 (0)