Skip to content

Call the producer.close() in a while loop will case an Error  #1090

Closed
@CheongHoo

Description

@CheongHoo

my code is like this:

while True:
    producer = KafkaProducer(bootstrap_servers=KAFKA_SERVER)
    producer.send('test', b'xxx')
    producer.close()

it will cause a error like bellow:
error: [Errono 9] Bad file descriptor
point to the line
if self._wake_w.send(b'x') !=1 in the client_async.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions