Fix for TCP connections not sending full content
Eventlet previously broke the standard API for sockets and made socket.send() work in the same manor as socket.sendall()c315ee86da
reverted to the standard behaviour. This was released as part of 0.18.0. The bug manifests itself when large (multi TCP message) AXFRs are performed over long distances. (I replicated it when the messages grew to 3, over USWest -> EU transfer) see http://graham.hayes.ie/posts/minidns-tcp-and-the-internet/ for details on testing. This change can cause packets to be dropped intermitently - but retry will allow this to be overcome. Change-Id: Ia0c15d843fb2092cc693b37dc701492396c647d0 Closes-Bug: #1552864 (cherry picked from commitf2c06477af
) (cherry picked from commit6c49166b06
)
This commit is contained in:
parent
b479cb7a3c
commit
a4b4c6dfb8
|
@ -364,7 +364,7 @@ class DNSService(object):
|
|||
# Handle TCP Responses
|
||||
msg_length = len(response)
|
||||
tcp_response = struct.pack("!H", msg_length) + response
|
||||
client.send(tcp_response)
|
||||
client.sendall(tcp_response)
|
||||
else:
|
||||
# Handle UDP Responses
|
||||
self._dns_sock_udp.sendto(response, addr)
|
||||
|
|
Loading…
Reference in New Issue