I initially opened a socket port, after a period of time, the running PHP script was turned off (the socket port is not turned off), when the script rerun, how to avoid the same IP + port repeatedly open the socket port caused by the error?? And how to reconnect to this port for normal communication??
Reply content:
I initially opened a socket port, after a period of time, the running PHP script was turned off (the socket port is not turned off), when the script rerun, how to avoid the same IP + port repeatedly open the socket port caused by the error?? And how to reconnect to this port for normal communication??
If the process ends, the associated port will also unbind, if you reopen the unable to bind the port, stating that your original process did not end, please check the process and there is no original script. In addition, do you have the code to close the port when you put the script off, and that doesn't solve the problem completely?