Move IRC->AMQP message sending into AMQP process
authorMatt Mullins <mmullins@mmlx.us>
Mon, 4 Jan 2016 07:38:43 +0000 (23:38 -0800)
committerMatt Mullins <mmullins@mmlx.us>
Mon, 4 Jan 2016 07:38:43 +0000 (23:38 -0800)
commit6470596a03f2c0569f78685732e0b4325c53938c
tree1c1efa1ec65388ee4584bfecd0d2ce2bc4dce146
parent155bf6a4711f6c2e82334e5d9e423146d7b3e544
Move IRC->AMQP message sending into AMQP process

This allows the message to be dropped if, for example, the AMQP process is
sleeping on the rate limit timer and causes a timeout instead of handling the
get_connection call.  Previously, this would crash the init process of
irc_amqp_listener, and since the gen_server timeout is only 5 seconds, the
irc_object_sup would reach its max restart intensity and exit.

As an added bonus: this is actually more reasonable message passing anyway.
amqp/amqp_bot_connection.erl
irc/irc_amqp_listener.erl