Oh yes, I did it! It came to mind that the server shuts down after all sessions have been shut down. My own session was still open. So the solution is:

elsif ($input eq "/shutdown") { # user entered /shutdown $poe_kernel->post($session_id => send => "don't do that!"); $kernel->yield("shutdown"); # <<< CLOSE MY SESSION $kernel->call('chat_server', 'shutdown'); return; }

That was simple. Of course this should be improved: I should close all sessions, not only mine. After sending them a message informing them about the shutdown, off course. :-)

I am used to the Lua programming language which is similar to Perl (no, I'm not provoking discussion about similarities and differences), and I'm trying to switch to Perl. With Lua and the LuaCopas module, one isn't able to stop sessions without shutting down the program itself, as far as I know. It uses a coroutine for every session. So I wasn't used to that. :-)

To me this case is closed. I'm not sure about jsarrel's problem.

About my epoll question, I'll continue my research...


In reply to Re^3: POE - can't shutdown Component::Server::TCP from Component::Client::TCP by pacow
in thread POE - can't shutdown Component::Server::TCP from Component::Client::TCP by jsarrel

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.