stream_socket_client($connectAddr, $err_no, $err_msg, 1, STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT);
Server has reload, the tcpdump like below.
11:49:37.204166 IP localhost.afs3-callback > localhost.10438: Flags [F.], seq 86, ack 250, win 7, options [nop,nop,TS val 2411970347 ecr 2411965658], length 0
11:49:37.243739 IP localhost.10438 > localhost.afs3-callback: Flags [.], ack 87, win 4, options [nop,nop,TS val 2411970357 ecr 2411970347], length 0
When other request handled, the tcpdump like below.
11:49:45.919587 IP localhost.10438 > localhost.afs3-callback: Flags [P.], seq 250:499, ack 87, win 4, options [nop,nop,TS val 2411972525 ecr 2411970347], length 249
11:49:45.919598 IP localhost.afs3-callback > localhost.10438: Flags [R], seq 537090585, win 0, length 0
Why doesn't php-fpm handle connection closing properly, it will reuse the CLOSE_WAIT status connection ?
AFAIK, php-fpm need send FIN. first and will receive reset notify [R] ? But it pushed the data directly [P.] ! It's an amazing!
If so, how can I detect the connection has shutdown by remote server ? and what I can do ?