Subject: | event in wrong session |
I just spent the last couple hours trying to figure out why the events
in my POE::Component::Client::Asterisk::Manager object got different
HEAP hashes when I post to them from another session than they do when
an event comes from through from Asterisk.
Finally figured out (I'm new to POE) that the reason is that there are
two sessions, 'monitor' and 'monitor_client'. I had expected that the
events would be called in the 'monitor' session, since that was the
alias I set on the object. Actually, the callback method does a yield,
so it calls them in 'monitor_client', and consequently my session data
is different.
I would suggest changing the yield to post to the parent session
('monitor').