postwait/node-amqp — pull request #237 by unframework (2013-08-26 17:49:51+00:00)
Title: Fix channel overflow

https://github.com/postwait/node-amqp/issues/205

The client library is ignoring the max channel ID limit sent by the server (65535) instead of properly wrapping the ID back around to 1. When the client-generated channel ID hits the limit, the server kicks out the client with an error.

Changed to wrap-around the channel ID properly, while avoiding already-used IDs.