[issue26403] Don't call sendto in socketserver.DatagramRequestHandler if there is nothing to send

2016-02-22 Thread desbma
desbma added the comment: OK, so first part of this issue (sendto called even if no data has been written) is indeed a duplicate of https://bugs.python.org/issue1767511 sorry for that. For the second part of the issue (the exception not silenced), I have attached a new patch. --

[issue26403] Don't call sendto in socketserver.DatagramRequestHandler if there is nothing to send

2016-02-22 Thread Martin Panter
Martin Panter added the comment: Actually there is precedent for some asynchronous errors due to the client to be ignored: * Revision 87d3f91e44d4: Catch socket.error (now OSError) from accept() * r73819: Catch socket.error (OSError) to handle ENOTCONN from shutdown() * Revision 7e5d7ef4634d:

[issue26403] Don't call sendto in socketserver.DatagramRequestHandler if there is nothing to send

2016-02-21 Thread Martin Panter
Martin Panter added the comment: This change has already been proposed in Issue 1767511, which I recently replied to. I think it is valid to send an empty datagram back to the client, and not doing so could break existing code. Also see Issue 5824 about removing the comment about recvfrom()

[issue26403] Don't call sendto in socketserver.DatagramRequestHandler if there is nothing to send

2016-02-21 Thread Berker Peksag
Berker Peksag added the comment: This looks like a duplicate of issue 5824. See msg259969 for Martin's analysis in that issue. There is also a similar patch for 2.7 in issue 1767511: http://bugs.python.org/file9271/DatagramServer.diff -- nosy: +berker.peksag, martin.panter

[issue26403] Don't call sendto in socketserver.DatagramRequestHandler if there is nothing to send

2016-02-21 Thread desbma
Changes by desbma : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list

[issue26403] Don't call sendto in socketserver.DatagramRequestHandler if there is nothing to send

2016-02-21 Thread desbma
Changes by desbma : -- title: Don't call sendto in DatagramRequestHandler if there is nothing to send -> Don't call sendto in socketserver.DatagramRequestHandler if there is nothing to send ___ Python tracker