diff options
author | Eric Wong <e@80x24.org> | 2015-09-24 03:37:20 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-09-24 06:58:33 +0000 |
commit | e3f00c42863737e588218fe904aed54449d4cf23 (patch) | |
tree | d2dc987310ab9aa7365121c3299f339e5e9f06d0 /public-inbox-nntpd | |
parent | 889663221bdd796d67e9c536108b3094305f8e80 (diff) | |
download | public-inbox-e3f00c42863737e588218fe904aed54449d4cf23.tar.gz |
We can use the UNIVERSAL::can to better encapsulate the shutdown process, in case we need to implement a gopher or HTTP daemon.
Diffstat (limited to 'public-inbox-nntpd')
-rw-r--r-- | public-inbox-nntpd | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/public-inbox-nntpd b/public-inbox-nntpd index 70bab46f..9fb69cec 100644 --- a/public-inbox-nntpd +++ b/public-inbox-nntpd @@ -204,8 +204,7 @@ sub worker_quit { my $n = 0; foreach my $s (values %$dmap) { - next unless ref($s) eq 'PublicInbox::NNTP'; - if ($s->busy) { + if ($s->can('busy') && $s->busy) { ++$n; } else { $s->close; |