about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-02-25 05:26:23 +0000
committerEric Wong <e@80x24.org>2016-02-25 05:26:40 +0000
commit92caa961d72bbb4a6e739b8a50927e62aa3a3e8f (patch)
tree094dc40cc97ecbc65d046e6a7be451bbb422e43e
parent0258ba3cd2d32ee46f95e9fc8d0adeb857459d64 (diff)
downloadpublic-inbox-92caa961d72bbb4a6e739b8a50927e62aa3a3e8f.tar.gz
Danga::Socket will die on us if we hit the base implementations.
-rw-r--r--lib/PublicInbox/HTTP.pm5
-rw-r--r--public-inbox-httpd1
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/PublicInbox/HTTP.pm b/lib/PublicInbox/HTTP.pm
index a5149ac2..f65dedaa 100644
--- a/lib/PublicInbox/HTTP.pm
+++ b/lib/PublicInbox/HTTP.pm
@@ -331,4 +331,9 @@ sub quit {
         $self->close;
 }
 
+# callbacks for Danga::Socket
+
+sub event_hup { $_[0]->close }
+sub event_err { $_[0]->close }
+
 1;
diff --git a/public-inbox-httpd b/public-inbox-httpd
index 0c1e24cb..772333e8 100644
--- a/public-inbox-httpd
+++ b/public-inbox-httpd
@@ -72,6 +72,7 @@ sub new {
 
 sub event_read { $_[0]->{cb}->() }
 sub event_hup { $_[0]->{cb}->() }
+sub event_err { $_[0]->{cb}->() }
 sub sysread { shift->{sock}->sysread(@_) }
 
 1;