mirror of
https://github.com/proxytunnel/proxytunnel.git
synced 2026-01-23 02:34:59 +00:00
As worker, close the unneeded listening socket.
This commit is contained in:
parent
4690473fba
commit
cef27b8576
1 changed files with 3 additions and 0 deletions
|
|
@ -343,6 +343,9 @@ void do_daemon()
|
|||
if ( ( pid = fork() ) < 0 ) {
|
||||
my_perror( "Cannot fork worker" );
|
||||
} else if ( pid == 0 ) {
|
||||
/* As worker, we do not need to listen for new connections */
|
||||
close(listen_sd);
|
||||
|
||||
read_fd = write_fd = sd_client;
|
||||
|
||||
/* Create a stdin/out stream */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue