sensu / sensu-transport

The Sensu transport abstraction library.
MIT License
14 stars 19 forks source link

Reset (close connection) on periodic reconnect attempts, cleaning up SSL context #16

Closed portertech closed 9 years ago

portertech commented 9 years ago

This PR causes the RabbitMQ transport to reset on every periodic reconnect attempt, which includes closing the current connection (if any).

portertech commented 9 years ago

Increasing timer delay works as expected:

{"timestamp":"2015-07-27T14:35:21.459168-0700","level":"warn","message":"reconnecting to transport"}
{"timestamp":"2015-07-27T14:35:23.461922-0700","level":"error","message":"[amqp] Detected TCP connection failure"}
{"timestamp":"2015-07-27T14:35:27.463015-0700","level":"error","message":"[amqp] Detected TCP connection failure"}
{"timestamp":"2015-07-27T14:35:33.463843-0700","level":"error","message":"[amqp] Detected TCP connection failure"}
{"timestamp":"2015-07-27T14:35:41.464729-0700","level":"error","message":"[amqp] Detected TCP connection failure"}
{"timestamp":"2015-07-27T14:35:51.465622-0700","level":"error","message":"[amqp] Detected TCP connection failure"}
{"timestamp":"2015-07-27T14:36:03.466616-0700","level":"error","message":"[amqp] Detected TCP connection failure"}
{"timestamp":"2015-07-27T14:36:17.467391-0700","level":"error","message":"[amqp] Detected TCP connection failure"}
{"timestamp":"2015-07-27T14:36:33.468257-0700","level":"error","message":"[amqp] Detected TCP connection failure"}
{"timestamp":"2015-07-27T14:36:51.469070-0700","level":"error","message":"[amqp] Detected TCP connection failure"}
{"timestamp":"2015-07-27T14:37:11.469965-0700","level":"error","message":"[amqp] Detected TCP connection failure"}
{"timestamp":"2015-07-27T14:37:31.470853-0700","level":"error","message":"[amqp] Detected TCP connection failure"}
{"timestamp":"2015-07-27T14:37:51.471471-0700","level":"error","message":"[amqp] Detected TCP connection failure"}
{"timestamp":"2015-07-27T14:38:11.489587-0700","level":"info","message":"reconnected to transport"}