esl/MongooseIM — pull request #341 by lavrin (2014-12-19 16:05:57+00:00)
Title: Fix inactivity timer not being set correctly

Don't defer updating #state.handlers until after the call to send_to_handler/3.
send_to_handler/3 calls send_wrapped_to_handler/3 which only sets up the inactivity timer if #state.handlers is empty!

(cherry picked from commit 7aeac8eddce2fbd42b5d0b8e3a77162f9fc31bde)