… | |
… | |
57 | |
57 | |
58 | $format = sprintf $format, @_ if @_; |
58 | $format = sprintf $format, @_ if @_; |
59 | |
59 | |
60 | my $NOW = (POSIX::strftime "%Y-%m-%d %H:%M:%S", gmtime $::NOW); |
60 | my $NOW = (POSIX::strftime "%Y-%m-%d %H:%M:%S", gmtime $::NOW); |
61 | print "$NOW: $format\n"; |
61 | print "$NOW: $format\n"; |
62 | printf $errorlog "$NOW: $format\n", @_ if $errorlog; |
62 | print $errorlog "$NOW: $format\n", @_ if $errorlog; |
63 | } |
63 | } |
64 | |
64 | |
65 | our $connections = new Coro::Semaphore $::MAX_CONNECTS || 250; |
65 | our $connections = new Coro::Semaphore $::MAX_CONNECTS || 250; |
66 | our $httpevent = new Coro::Signal; |
66 | our $httpevent = new Coro::Signal; |
67 | |
67 | |