Closed bakkerthehacker closed 11 years ago
Any update on this?
Post merge, still seeing memory leak problem due to reconnect event handlers.
Belay that, working locally. How do we get this out to npm?
I'm assuming that postwait or someone else will decide that the code is stable enough and that enough new features have been merged in, rev the code, and push to npm.
Thanks for fixing that. I'm now seeing a new problem, not sure whether this is expected behavior.
Example code:
// not running RabbitMQ locally
var connection = amqp.createConnection();
connection.on('error', function(err){
console.log("ERROR: " + err.message);
});
Output (one second between each line):
ERROR: connect ECONNREFUSED
ERROR: connect EADDRNOTAVAIL
ERROR: connect EADDRNOTAVAIL
...
ERROR: connect EADDRNOTAVAIL
The first connection attempt is refused, after that it's address not available. Shouldn't they all be connection refused?
i could look into it
Thanks, I'm not yet familiar enough with the amqp source to make a suggestion. The little research I've done suggests that EADDRNOTAVAIL means you're trying to bind a socket that's already bound. But connecting from a client-side app shouldn't have to do that, right?
Maybe it has to do with keeping the old connection around?
Side question: Is there a way to turn off the reconnect logic from client code? When RabbitMQ dies, I have to rebuild the world on the client side anyway (reestablish transient exchanges, make a new queue etc.) So I'd kinda like to just do the reconnecting myself.
Thanks, that's just what I needed - also, looks like the patch made it to npm :)
Fixed exponential reconnect not wait twice as much. Moved possibleAuthErrorHandler to addAllListeners. Fixed reconnect removing all externally added events.