diff options
author | Eric Wong <e@80x24.org> | 2016-03-31 03:33:59 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-03-31 03:34:18 +0000 |
commit | 83a6b503812e4f17ea2eab10c7ae1ade6427f821 (patch) | |
tree | 62d1962010595742423e47516e55ab95dd0c770d /script/public-inbox-httpd | |
parent | 8c56a2317a3daca70d0e35c0e38b4b15be4823a8 (diff) | |
download | public-inbox-83a6b503812e4f17ea2eab10c7ae1ade6427f821.tar.gz |
Avoid wasting memory and the risk of a potential reference cycles by dropping the callback ASAP.
Diffstat (limited to 'script/public-inbox-httpd')
-rwxr-xr-x | script/public-inbox-httpd | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/script/public-inbox-httpd b/script/public-inbox-httpd index e7ed3c9d..3ca974c9 100755 --- a/script/public-inbox-httpd +++ b/script/public-inbox-httpd @@ -82,6 +82,12 @@ sub event_hup { $_[0]->{cb}->() } sub event_err { $_[0]->{cb}->() } sub sysread { shift->{sock}->sysread(@_) } +sub close { + my $self = shift; + $self->{cb} = undef; + $self->SUPER::close(@_); +} + 1; package PublicInbox::HTTPD; |