static void
connect_fail_continuation (struct GNUNET_CONNECTION_Handle *h)
{
- LOG ((0 !=
- strncmp (h->hostname, "localhost:",
- 10)) ? GNUNET_ERROR_TYPE_INFO : GNUNET_ERROR_TYPE_WARNING,
- _
- ("Failed to establish TCP connection to `%s:%u', no further addresses to try.\n"),
+ LOG (GNUNET_ERROR_TYPE_INFO,
+ _("Failed to establish TCP connection to `%s:%u', no further addresses to try.\n"),
h->hostname, h->port);
/* connect failed / timed out */
GNUNET_break (h->ap_head == NULL);
GNUNET_NETWORK_socket_shutdown (sock->sock, SHUT_RDWR);
GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (sock->sock));
sock->sock = NULL;
+ GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == sock->write_task);
}
if (sock->read_task != GNUNET_SCHEDULER_NO_TASK)
{
_
("Could not satisfy pending transmission request, socket closed or connect failed (%p).\n"),
sock);
+ GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == sock->write_task);
transmit_error (sock);
return; /* connect failed for good, we're finished */
}
if (errno == EINTR)
goto RETRY;
LOG_STRERROR (GNUNET_ERROR_TYPE_DEBUG, "send");
+ if (GNUNET_SCHEDULER_NO_TASK != sock->write_task)
+ {
+ GNUNET_SCHEDULER_cancel (sock->write_task);
+ sock->write_task = GNUNET_SCHEDULER_NO_TASK;
+ }
transmit_error (sock);
return;
}