diff options
Diffstat (limited to 'lib/proxy.c')
| -rw-r--r-- | lib/proxy.c | 21 | 
1 files changed, 10 insertions, 11 deletions
| diff --git a/lib/proxy.c b/lib/proxy.c index dff5d0a4..0e1c8f07 100644 --- a/lib/proxy.c +++ b/lib/proxy.c @@ -129,18 +129,17 @@ static int proxy_connect_none(const char *host, unsigned short port, struct PHB  	event_debug("proxy_connect_none( \"%s\", %d ) = %d\n", host, port, fd); -	if (connect(fd, (struct sockaddr *)sin, sizeof(*sin)) < 0) { -		if (sockerr_again()) { -			phb->inpa = b_input_add(fd, GAIM_INPUT_WRITE, gaim_io_connected, phb); -			phb->fd = fd; -		} else { -			closesocket(fd); -			g_free(phb); -			return -1; -		} +	if (connect(fd, (struct sockaddr *)sin, sizeof(*sin)) < 0 && !sockerr_again()) { +		closesocket(fd); +		g_free(phb); +		 +		return -1; +	} else { +		phb->inpa = b_input_add(fd, GAIM_INPUT_WRITE, gaim_io_connected, phb); +		phb->fd = fd; +		 +		return fd;  	} - -	return fd;  } | 
