You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the callback API, the createChannel() can throw an error instead of returning the error in the callback.
varamqp=require('amqplib/callback_api');amqp.connect('amqp://localhost?channelMax=1',function(err,conn){conn.createChannel(function(err){if(err){returnconsole.log(err);}console.log('callback created 1');conn.createChannel(function(err){// does not get calledif(err){returnconsole.log(err);}console.log('callback created 2');});// this immediately throws});});
callback created 1
events.js:72
throw er; // Unhandled 'error' event
^
Error: No channels left to allocate
at Connection.C.freshChannel
The text was updated successfully, but these errors were encountered:
In the callback API, the
createChannel()
can throw an error instead of returning the error in the callback.The text was updated successfully, but these errors were encountered: