removed more tabs

This commit is contained in:
Emiel Bruijntjes 2018-03-06 08:45:12 +01:00
parent 69596e49dc
commit 5b8841c937
3 changed files with 10 additions and 7 deletions

View File

@ -67,7 +67,10 @@ public:
const char *last = data + size;
// must start with ampqs:// to have a secure connection (and we also assign a different default port)
if ((_secure = strncmp(data, "amqps://", 8) == 0)) _port = 5671;
_secure = strncmp(data, "amqps://", 8) == 0;
// default port changes for secure connections
if (_secure) _port = 5671;
// otherwise protocol must be amqp://
else if (strncmp(data, "amqp://", 7) != 0) throw std::runtime_error("AMQP address should start with \"amqp://\" or \"amqps://\"");