Hi-

I'm still feeling my way around POE, but have stumbled on something which I really don't understand. I'm POST-ing from one "POE::Component::Client::TCP" to another. The receiving one has an alias, set as follows:

  POE::Component::Client::TCP->new(
    Alias         => "scanner",

The sending one posts from an event handler like so:

    ConnectError => sub {
      # The connection failed.
      if (! $_[KERNEL]->post("scanner", "new_ss_status", $ss_status_bad)) {
         print "Post to scanner failed. Error: $!";
      }
      $_[KERNEL]->delay(reconnect => $delay_reconnect );
      },


The code runs as expected for a minute or so, and then the post fails, with the error message "no such process". Subsequent posts succeed!

If I enable ASSERT_DEFAULT in the main program, I get

<dt>  Cannot resolve ``scanner'' into a session reference.

So, I was wondering, is there some reason why this alias would not work from time to time?

Thanks

Peter Payzant



Reply via email to