Fix test failure involving client/server race

Test was assuming that when 'connect' event occurs on client, server
has also seend the tcp connection. This is not true, there is
propogation delay of ACK from client to server, then event propogation
up server TCP stack, and then Node delivers new connection to callback
on server. Mostly, this happens so fast, that the test worked, but on
ci, only when run from jenkins, the timing changes. The result would be
master sending graceful shutdown notification to worker, worker not yet
having any open sockets, so the sockets wouldn't get closed, but then
connection would come in right after, keep worker alive, and master
would eventually terminate it.