… | |
… | |
15 | |
15 | |
16 | tcp_server $host, $port, sub { |
16 | tcp_server $host, $port, sub { |
17 | my ($fh, $host, $port) = @_ |
17 | my ($fh, $host, $port) = @_ |
18 | or return; |
18 | or return; |
19 | |
19 | |
20 | my $fd = fileno $fh; |
|
|
21 | |
|
|
22 | warn "new connection from [$host]:$port\n"; |
20 | warn "new connection from [$host]:$port\n"; |
23 | |
21 | |
24 | # HACK to avoid blocking on common files on log-in. |
22 | # HACK to avoid blocking on common files on log-in. |
25 | # remove once async |
23 | # remove once async |
26 | cf::async {#d# |
24 | cf::async {#d# |
27 | warn "HACK ext/tcp.ext: $cf::CONFDIR/$_\n" and Coro::AIO::aio_load "$cf::CONFDIR/$_", my $dummy for qw(rules news motd);#d# |
|
|
28 | warn "HACK ext/tcp.ext: $cf::LOCALDIR/crossfiremail\n" and Coro::AIO::aio_load "$cf::LOCALDIR/crossfiremail", my $dummy;#d# |
25 | warn "HACK ext/tcp.ext: $cf::LOCALDIR/crossfiremail\n" and Coro::AIO::aio_load "$cf::LOCALDIR/crossfiremail", my $dummy;#d# |
29 | cf::client::create $fd, $host; |
26 | cf::client::create fileno $fh, $host; |
30 | undef $fh;#d# |
|
|
31 | };#d#d |
27 | };#d#d |
32 | }; |
28 | }; |
33 | } |
29 | } |
34 | |
30 | |