From 92caa961d72bbb4a6e739b8a50927e62aa3a3e8f Mon Sep 17 00:00:00 2001
From: Eric Wong <e@80x24.org>
Date: Thu, 25 Feb 2016 05:26:23 +0000
Subject: [PATCH] httpd: fill in missing Danga::Socket callbacks

Danga::Socket will die on us if we hit the base implementations.
---
 lib/PublicInbox/HTTP.pm | 5 +++++
 public-inbox-httpd      | 1 +
 2 files changed, 6 insertions(+)

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;
-- 
2.51.0