squaremo/amqp.node — pull request #118 by rexxars (2014-11-28 10:52:48+00:00)
Title: Allow specifying connection timeout in socket options

Since `connect()` does not return the socket instance, there is currently no easy way to set the connection timeout. This PR adds a `timeout` option to the socket options passed to `connect()`, and automatically sets it on the socket when connecting. If a timeout is reached, it will trigger the connect callback with an error.

This should solve #88 .