ruby-amqp/bunny — pull request #219 by MuhanZou (2014-06-17 00:12:27+00:00)
Title: change return values for tls_enabled?

By changing the return values, we can use the tls or ssl params to explicitly disable using ssl. For the current code, those two params will be useless as normally (opts[:port] == AMQ::Protocol::TLS_PORT) will return true. I met this issue when trying to push messages to a rabbitmq server where the ssl is not setup...

Errors I met:
1. Using TLS but no client certificate is provided! If RabbitMQ is configured to verify peer certificate, connection upgrade will fail!
2. Errno::ECONNRESET: Connection reset by peer - SSL_connect

Please correct me if I am wrong. Thanks!