Close listening sockets when done
This commit is contained in:
parent
74024f001f
commit
3e48720fad
1 changed files with 4 additions and 0 deletions
|
@ -97,8 +97,12 @@ handle_tcp(const char *port)
|
||||||
{
|
{
|
||||||
int s[8];
|
int s[8];
|
||||||
size_t nsocks = nelems(s);
|
size_t nsocks = nelems(s);
|
||||||
|
size_t i;
|
||||||
|
|
||||||
listen_sock_setup(port, SOCK_STREAM, s, &nsocks);
|
listen_sock_setup(port, SOCK_STREAM, s, &nsocks);
|
||||||
|
|
||||||
|
for (i = 0; i < nsocks; i++)
|
||||||
|
close(s[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue