<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div dir="ltr"><span>Last I checked it worked however there's no version of this in the&nbsp;catalyst test repo. &nbsp;If you can help me figure out how to bake a test for this (even if it needs to be an optional developer&nbsp;only test) I'd greatly appreciate it.</span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"> <font size="2" face="Arial"> On Sunday, February 22, 2015 7:09 PM, Toby Corkindale &lt;toby@dryft.net&gt; wrote:<br> </font> </div>  <br><br> <div class="y_msg_container">Hi,<br>I've been trying to replicate the use of WebSockets in Catalyst, by<br>following the example from the Advent calendar a year and a bit ago.<br>ie.<br><a href="https://github.com/perl-catalyst/2013-Advent-Staging/blob/master/Websocket-Echo/lib/MyApp/Controller/Root.pm" target="_blank">https://github.com/perl-catalyst/2013-Advent-Staging/blob/master/Websocket-Echo/lib/MyApp/Controller/Root.pm</a><br><br>In my experience, it isn't actually working properly -- I get the<br>"Echo Initiated" message, but then an instant disconnect.<br><br>Looking at the code, I'm highly suspicious of the $hd variable -- it<br>doesn't get stored anywhere, and according to the AnyEvent docs, I<br>think that means it will get DESTROYed once it goes out of scope. ie.<br>Immediately.<br><br>That fits the behaviour I'm seeing, although I think I've had it work<br>for me randomly at times as well, so...&nbsp; I don't know.<br><br>I wondered if anyone here has thoughts on the matter?<br><br>Cheers,<br>Toby<br><br>_______________________________________________<br>List: <a ymailto="mailto:Catalyst@lists.scsys.co.uk" href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br><br><br></div>  </div> </div>  </div> </div></body></html>