mirror of
https://github.com/miekg/dns.git
synced 2025-10-18 05:11:01 +02:00
Clarify comment
This commit is contained in:
parent
6f7aad15d8
commit
ffb28d97f9
@ -315,6 +315,7 @@ func (c *conn) close() {
|
|||||||
|
|
||||||
// Serve a new connection.
|
// Serve a new connection.
|
||||||
func (c *conn) serve() {
|
func (c *conn) serve() {
|
||||||
|
// for block to make it easy to break out to close the tcp connection
|
||||||
for {
|
for {
|
||||||
// Request has been read in ServeUDP or ServeTCP
|
// Request has been read in ServeUDP or ServeTCP
|
||||||
w := new(response)
|
w := new(response)
|
||||||
@ -343,7 +344,7 @@ func (c *conn) serve() {
|
|||||||
if c.hijacked {
|
if c.hijacked {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
break // TODO(mg) Why is this a loop anyway?
|
break
|
||||||
}
|
}
|
||||||
if c._TCP != nil {
|
if c._TCP != nil {
|
||||||
c.close() // Listen and Serve is closed then
|
c.close() // Listen and Serve is closed then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user