From 8ac256351f08b780b3505fd058db2f2ba829d6dd Mon Sep 17 00:00:00 2001 From: Barna Csorogi Date: Fri, 9 Jun 2017 15:06:02 +0200 Subject: [PATCH] turn mitm conn Set[Read|Write]Deadline methods into noops Timeouts should be handled by the http stack for the underlying tcp connections so noops are appropriate for this virtual connection. No need to panic. --- proxy/mitmconn.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proxy/mitmconn.go b/proxy/mitmconn.go index 443b606..5ef7c6e 100644 --- a/proxy/mitmconn.go +++ b/proxy/mitmconn.go @@ -52,15 +52,15 @@ func (c *mitmConn) LocalAddr() net.Addr { } func (c *mitmConn) SetDeadline(t time.Time) error { - panic("not implemented") + return nil } func (c *mitmConn) SetReadDeadline(t time.Time) error { - panic("not implemented") + return nil } func (c *mitmConn) SetWriteDeadline(t time.Time) error { - panic("not implemented") + return nil } type addr string