uvbook
uvbook copied to clipboard
multi-echo-server example did not close connection
Hi,
First, thanks a lot for the book and examples, really useful.
If I run tcp-echo-server and use netcat to test, connection is closed immediately
[root@375f8431ca9f code]# echo -n 'hello!' | nc 127.0.0.1 7000
hello![root@375f8431ca9f code]#
however, if I run multi-echo-server the connection is not closed
[root@375f8431ca9f code]# echo -n 'hello!' | nc 127.0.0.1 7000
hello!
Is this expected behavior because of using child process?
Excellent question. I'm not sure what is the reason. It should not be due to the different architecture because the main process just sends the socket FD to the worker.