ph713 has asked for the wisdom of the Perl Monks concerning the following question:
The problem I'm having is that as soon as a thread exits (recycles self after receiving RCVR_MAXCON connections), I start getting error messages of the form:
Attempt to free unreferenced scalar at /usr/lib/perl5/5.8.1/i586-linux-thread-multi/IO/Socket.pm line 46.
That part of IO::Socket is the line containting delete $arg{Timeout} in the new() function:
Any thoughts on what I'm doing wrong with the socket to generate these warnings? Other than the warnings themselves, the code seems to work as it's supposed to. (example scripts themselves moved to a comment below)sub new { my($class,%arg) = @_; my $sock = $class->SUPER::new(); $sock->autoflush(1); ${*$sock}{'io_socket_timeout'} = delete $arg{Timeout}; return scalar(%arg) ? $sock->configure(\%arg) : $sock; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problems with a thread-pooled tcp server
by dave_the_m (Monsignor) on Jan 13, 2005 at 18:20 UTC | |
by ph713 (Pilgrim) on Jan 13, 2005 at 20:15 UTC | |
|
Re: Problems with a thread-pooled tcp server
by ph713 (Pilgrim) on Jan 13, 2005 at 17:47 UTC | |
by BrowserUk (Patriarch) on Jan 13, 2005 at 19:35 UTC |