{
nbdebug(("error in gethostbyname() in netbeans_connect()\n"));
PERROR("gethostbyname() in netbeans_connect()");
+ sock_close(sd);
goto theend;
}
memcpy((char *)&server.sin_addr, host->h_addr, host->h_length);
|| (errno == EINTR)))
{
nbdebug(("retrying...\n"));
- sleep(5);
- if (!doabort)
+ mch_delay(3000L, TRUE);
+ ui_breakcheck();
+ if (got_int)
{
- ui_breakcheck();
- if (got_int)
- {
- errno = EINTR;
- break;
- }
+ errno = EINTR;
+ break;
}
if (connect(sd, (struct sockaddr *)&server,
sizeof(server)) == 0)
/* Get here when the server can't be found. */
nbdebug(("Cannot connect to Netbeans #2\n"));
PERROR(_("Cannot connect to Netbeans #2"));
+ sock_close(sd);
if (doabort)
getout(1);
goto theend;
{
nbdebug(("Cannot connect to Netbeans\n"));
PERROR(_("Cannot connect to Netbeans"));
+ sock_close(sd);
if (doabort)
getout(1);
goto theend;