Commit 76143e7e by jim

Revert previous commit

git-svn-id: https://bucket.mit.edu/svn/nilm/acquisition/ethstream@10233 ddd99763-3ecb-0310-9145-efcb8ce7c51f
parent 3ba61684
Showing with 4 additions and 0 deletions
......@@ -97,6 +97,7 @@ static int discovered_sock_create(struct discover_t *ds, uint32_t local_ip,
/* Set nonblocking */
if (soblock(sock, 0) < 0) {
verb("can't set nonblocking\n");
close(sock);
return 0;
}
......
......@@ -402,6 +402,7 @@ int ue9_open(const char *host, int port)
/* Set nonblocking */
if (soblock(fd, 0) < 0) {
verb("can't set nonblocking\n");
close(fd);
return -1;
}
......@@ -417,6 +418,7 @@ int ue9_open(const char *host, int port)
he = gethostbyname(host);
if (he == NULL) {
verb("gethostbyname(\"%s\") failed\n", host);
close(fd);
return -1;
}
address.sin_addr = *((struct in_addr *)he->h_addr);
......@@ -429,6 +431,7 @@ int ue9_open(const char *host, int port)
.tv_sec = TIMEOUT}) < 0) {
verb("connection to %s:%d failed: %s\n",
inet_ntoa(address.sin_addr), port, compat_strerror(errno));
close(fd);
return -1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment