http://www.perlmonks.org?node_id=1081680


in reply to Re^4: PSGI, Plack, Twiggy, AnyEvent and SockJS... I need help
in thread PSGI, Plack, Twiggy, AnyEvent and SockJS... I need help

Of course the timer fires only once, because we undef the timer in its callback. If you want to keep the timer running, you need to move its variable to somewhere that stays alive or never undef it in the callback.