amqp-node / amqplib

AMQP 0-9-1 library and client for Node.JS
https://amqp-node.github.io/amqplib/
Other
3.69k stars 474 forks source link

Typo in the example code #762

Closed ipython3 closed 6 months ago

ipython3 commented 6 months ago

In https://amqp-node.github.io/amqplib/, there is a section explaining "Why does amqplib crash my application?". I believe that there is a typo in the example code:

const connection = await amqplib.connect();
connection.on('error', (err) => {
  // recover or exit
});

const channel = await connection.createChannel();
channel.on('error', (err) => {
  // recover or exit
})l

The l character in the end should be a semicolon.

Thank you for creating this easy-to-use library!

cressie176 commented 6 months ago

Thanks @ipython3. I've fixed the docs.