Closing socket descriptor

This commit is contained in:
John Jones 2017-05-11 14:30:52 -05:00
parent a5e5a71ddd
commit 6c936de20e
3 changed files with 6 additions and 3 deletions

View file

@ -200,10 +200,10 @@ void *ipfs_null_listen (void *ptr)
}
}
close(socketfd);
thpool_destroy(thpool);
close(socketfd);
return (void*) 2;
}

View file

@ -146,7 +146,7 @@ int drop_and_build_repository(const char* path, int swarm_port, struct Libp2pVec
}
mkdir(path, S_IRWXU);
return make_ipfs_repository(path, swarm_port, bootstrap_peers, peer_id);
return -make_ipfs_repository(path, swarm_port, bootstrap_peers, peer_id);
}

View file

@ -203,5 +203,8 @@ int main(int argc, char** argv) {
}
}
libp2p_logger_free();
fclose(stdin);
fclose(stdout);
fclose(stderr);
return 1;
}