Re: Client crash making server crash
[email protected] (Eric Martel) Fri, 19 Aug 2011 15:58:13 -0400
| Newsgroups | perl.poe |
|---|---|
| Message-ID | <[email protected]> |
Also, I don't know if it's relevant, but I use POE::Filter::Block for the POE::Wheel::ReadWrite Filter. Le 2011-08-19 14:43, Eric Martel a écrit : > 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/
eric.vcf
(text/x-vcard, 130 B)
begin:vcard fn:Eric Martel n:Martel;Eric email;internet:[email protected] tel;fax:1-888-384-9136 version:2.1 end:vcard
signature.asc
(application/pgp-signature, 262 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5OwFUACgkQ8B7YqO0/GRwBzACgh2L3WGLHihCBAphiSXXUUEus ZeMAn0O3zTK0p96Fd0woljWoY8RGzTSb =/f1n -----END PGP SIGNATURE-----