On Monday 25 March 2002 02:38 pm, Jason Gauthier wrote:
> It doesn't work anyway, chill out.
>

Yeah, my Perl is a little rusty...
Because $sock is local to the for loop, it gets undef'd after the loop and 
closes the socket pretty quick...
I had written a simple server to test it on that accepted connections right 
away, rather than pulsing like a MUD.  It looked like it worked, but I didn't 
consider the difference between that server and a MUD.
Since the MUD will only accept one new connection per pulse, the system has 
time to clean up the closed descriptors in between.
Fixing the script to work remotely on a MUD is easy enough, you just have to 
keep the socket descriptors defined someplace with larger scope.

....
Mon Mar 25 13:17:37 2002 :: Sock.sinaddr:  216.169.42.156
Mon Mar 25 13:17:37 2002 :: Sock.sinaddr:  216.169.42.156
Mon Mar 25 13:17:37 2002 :: Sock.sinaddr:  216.169.42.156
Mon Mar 25 13:17:37 2002 :: Sock.sinaddr:  216.169.42.156
New_descriptor: accept: Too many open files
....

--Palrich.

Reply via email to