Remove useless null check. Cycle server on early connection problem.
This commit is contained in:
parent
0ecb77617c
commit
2ef3506a22
|
@ -897,8 +897,6 @@ static void create_socket(char *dsthostname, char *dstport, char *srchostname,
|
||||||
cn->connected = CONN_ERROR;
|
cn->connected = CONN_ERROR;
|
||||||
cdata = (struct connecting_data *)
|
cdata = (struct connecting_data *)
|
||||||
bip_malloc(sizeof(struct connecting_data));
|
bip_malloc(sizeof(struct connecting_data));
|
||||||
if (!cdata)
|
|
||||||
fatal("Out of memory.");
|
|
||||||
cdata->dst = cdata->src = cdata->cur = NULL;
|
cdata->dst = cdata->src = cdata->cur = NULL;
|
||||||
|
|
||||||
err = getaddrinfo(dsthostname, dstport, &hint, &cdata->dst);
|
err = getaddrinfo(dsthostname, dstport, &hint, &cdata->dst);
|
||||||
|
|
|
@ -2127,6 +2127,7 @@ connection_t *irc_server_connect(struct link *link)
|
||||||
if (conn->handle == -1) {
|
if (conn->handle == -1) {
|
||||||
mylog(LOG_INFO, "Cannot connect.");
|
mylog(LOG_INFO, "Cannot connect.");
|
||||||
connection_free(conn);
|
connection_free(conn);
|
||||||
|
server_next(link);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue