Fix immediate connects
Apparently FreeBSD can do this while Linux can not.
This commit is contained in:
parent
9a340e5b8f
commit
67b67cb171
2
common.c
2
common.c
|
@ -205,7 +205,7 @@ connector_step (struct connector *self)
|
|||
|
||||
connector_notify_connecting (self, target, gai_iter);
|
||||
|
||||
int fd = self->socket = socket (gai_iter->ai_family,
|
||||
int fd = socket (gai_iter->ai_family,
|
||||
gai_iter->ai_socktype, gai_iter->ai_protocol);
|
||||
if (fd == -1)
|
||||
{
|
||||
|
|
|
@ -4525,9 +4525,7 @@ irc_initiate_connect (struct server *s)
|
|||
|
||||
str_vector_free (&servers);
|
||||
|
||||
if (!e)
|
||||
s->state = IRC_CONNECTING;
|
||||
else
|
||||
if (e)
|
||||
{
|
||||
irc_destroy_connector (s);
|
||||
|
||||
|
@ -4535,6 +4533,8 @@ irc_initiate_connect (struct server *s)
|
|||
error_free (e);
|
||||
irc_queue_reconnect (s);
|
||||
}
|
||||
else if (s->state != IRC_CONNECTED)
|
||||
s->state = IRC_CONNECTING;
|
||||
}
|
||||
|
||||
// --- Input prompt ------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue