Subject: | socket stays connected when going out of scope |
Hi
Thanks for resolving previous 2 bugs super fast :)
I found new one which can be reproduced in the following way:
CODE:
use Log::Syslog::Fast ":all";
for (1..1024) {
Log::Syslog::Fast->new( LOG_UNIX, "/dev/log", 0, LOG_USER, LOG_INFO,
"foo", "bar" );
}
OUTPUT:
Error in ->new: Bad file descriptor at -e line 1.
WHERE:
loop counter is bigger than system limit for open files
Error is caused by reaching maximum number of opened sockets, somehow
module do not close them when current SysLog object is going out of scope.