mirror of
				https://github.com/coredns/coredns.git
				synced 2025-11-04 03:03:14 -05:00 
			
		
		
		
	Propagate both message and error in proxy exchange.
This commit is contained in:
		@@ -65,13 +65,9 @@ func (c *client) Exchange(m *dns.Msg, co net.Conn) (*dns.Msg, time.Duration, err
 | 
				
			|||||||
		return ret, e
 | 
							return ret, e
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	rtt := time.Since(start)
 | 
					 | 
				
			||||||
	if err != nil {
 | 
					 | 
				
			||||||
		return &dns.Msg{}, rtt, err
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	r1 := r.(dns.Msg)
 | 
						r1 := r.(dns.Msg)
 | 
				
			||||||
	return &r1, rtt, nil
 | 
						rtt := time.Since(start)
 | 
				
			||||||
 | 
						return &r1, rtt, err
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// exchange does *not* return a pointer to dns.Msg because that leads to buffer reuse when
 | 
					// exchange does *not* return a pointer to dns.Msg because that leads to buffer reuse when
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user