From a3e65f8500e6e73b1e8b583aa638e9773d919432 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 9 Nov 2010 13:51:33 +0000 Subject: [PATCH] report shutdown error --- src/util/connection.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/util/connection.c b/src/util/connection.c index a25dc0350..3f9690c0c 100644 --- a/src/util/connection.c +++ b/src/util/connection.c @@ -461,7 +461,7 @@ destroy_continuation (void *cls, struct GNUNET_CONNECTION_Handle *sock = cls; GNUNET_CONNECTION_TransmitReadyNotify notify; struct AddressProbe *pos; - + sock->destroy_task = GNUNET_SCHEDULER_NO_TASK; GNUNET_assert (sock->dns_active == NULL); if (0 != (sock->ccs & COCO_TRANSMIT_READY)) @@ -497,7 +497,10 @@ destroy_continuation (void *cls, "Shutting down socket (%p)\n", sock); #endif if (sock->persist != GNUNET_YES) - GNUNET_NETWORK_socket_shutdown (sock->sock, SHUT_RDWR); + { + if (GNUNET_YES != GNUNET_NETWORK_socket_shutdown (sock->sock, SHUT_RDWR)) + GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "shutdown"); + } } if (sock->read_task != GNUNET_SCHEDULER_NO_TASK) { @@ -945,6 +948,7 @@ GNUNET_CONNECTION_create_from_sockaddr (int af_family, struct GNUNET_NETWORK_Handle *s; struct GNUNET_CONNECTION_Handle *ret; + s = GNUNET_NETWORK_socket_create (af_family, SOCK_STREAM, 0); if (s == NULL) { -- 2.25.1