Fix hijack
This commit is contained in:
parent
0eae2d1735
commit
b2fadde636
|
@ -337,6 +337,7 @@ func (c *conn) serve() {
|
|||
w.req = req
|
||||
c.handler.ServeDNS(w, w.req) // this does the writing back to the client
|
||||
if c.hijacked {
|
||||
// client takes care of the connection, i.e. calls Close()
|
||||
return
|
||||
}
|
||||
break
|
||||
|
@ -345,6 +346,10 @@ func (c *conn) serve() {
|
|||
c._TCP.Close()
|
||||
c._TCP = nil
|
||||
}
|
||||
if c._UDP != nil {
|
||||
c._UDP.Close()
|
||||
c._UDP = nil
|
||||
}
|
||||
}
|
||||
|
||||
// Write implements the ResponseWriter.Write method.
|
||||
|
|
Loading…
Reference in New Issue