aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/transport/plugin_transport_udp.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index c5a4c7b3d..ad87ea68d 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -1741,8 +1741,15 @@ udp_select_read (struct Plugin *plugin, struct GNUNET_NETWORK_Handle *rsock)
1741 memset (&addr, 0, sizeof (addr)); 1741 memset (&addr, 0, sizeof (addr));
1742 size = GNUNET_NETWORK_socket_recvfrom (rsock, buf, sizeof (buf), 1742 size = GNUNET_NETWORK_socket_recvfrom (rsock, buf, sizeof (buf),
1743 (struct sockaddr *) &addr, &fromlen); 1743 (struct sockaddr *) &addr, &fromlen);
1744 1744#if MINGW
1745 if (size < sizeof (struct GNUNET_MessageHeader)) 1745 /* On SOCK_DGRAM UDP sockets recvfrom might fail with a
1746 * WSAECONNRESET error to indicate that previous sendto() (???)
1747 * on this socket has failed.
1748 */
1749 if ( (-1 == size) && (ECONNRESET == errno) )
1750 return;
1751#endif
1752 if ( (-1 == size) || (size < sizeof (struct GNUNET_MessageHeader)))
1746 { 1753 {
1747 GNUNET_break_op (0); 1754 GNUNET_break_op (0);
1748 return; 1755 return;