Hi folks,

I'm quite new to POE. I wrote a server using POE::Wheel::SocketFactory and
handling clients with POE::Wheel::ReadWrite, and everything works fine but for
one thing: there are moments when a client and the server will cross-exchange
much data (that is, the client sends data to the server, which replies with
other data, an this multiple times until they are finished), and I happened to
notice that if the client is killed before the end, the server will die, which
is not what I want...

The server crashes in Kernel.pm, at the line "confess unless defined $session;"
(line 1012 as of v1.311) within _dispatch_event(). What I guess is happening
(but I may be wrong) is that a '$client_wheel->put($data)' is made before the
client is killed, and when POE tries to actually handle the put(), the client
wheel session is already no longer accessible, before any ErrorEvent handler
could be called. Am I right on this?

I could not find any way I could prevent this, but surely there must be...? I
wonder if replacing the "confess" line by a simple "warn + return" (or the like)
could do the trick? Any help would be greatly appreciated.

-- 
Eric Martel
Québec (Québec)
Canada

Ce courriel est signé numériquement avec la clef suivante:
This e-mail is digitally signed with the following key:
  ED3F191C (key://pgp.mit.edu, http://key.ericmartel.net/)
Pour plus d'information: http://gpg.ericmartel.net/
For more info: http://www.gnupg.org/


<<attachment: eric.vcf>>

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to