Skip to content

Commit e8ffae2

Browse files
author
Jason Yu
committed
Removed unnecessary CloseWithContext function.
1 parent 0176c83 commit e8ffae2

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

producer.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -500,17 +500,9 @@ func (p *Producer) sendToDataSpill(msg *Message) {
500500
}
501501
}
502502

503-
// CloseWithContext initiates the graceful shutdown of the produce function, waiting for all outstanding messages and to
504-
// flush. Cancellation is supported through contexts.
505-
func (p *Producer) CloseWithContext(ctx context.Context) {
506-
p.shutdown()
507-
<-ctx.Done()
508-
close(p.pipeOfDeath)
509-
}
510-
511503
// Close initiates the graceful shutdown of the produce function, waiting for all outstanding messages and to flush.
512504
func (p *Producer) Close() {
513-
p.CloseWithContext(context.TODO())
505+
p.shutdown()
514506
}
515507

516508
// SendWithContext sends a message to the stream. Cancellation supported through contexts.

0 commit comments

Comments
 (0)