We are using unix domain socket to connect to sever in my project,
When testing, i found the unix domain socket file(which generated by server when server listen) was deleted every time ngx.socket.tcp calling connect.
As i check the sourcecode, I found below in the function ngx_parse_unix_domain_url.
/ delete domain socket file. /
ngx_delete_file(saun->sun_path);
it seems ngx.socket.tcp would delete socket file every time it connect, and it would cause connect failure with err of "unix:/home/nginx/nginx/server.sock failed (2: No such file or directory)".
so my question is why it delete the socket file?
anybody knows? pls suggest.
We are using unix domain socket to connect to sever in my project, When testing, i found the unix domain socket file(which generated by server when server listen) was deleted every time ngx.socket.tcp calling connect. As i check the sourcecode, I found below in the function ngx_parse_unix_domain_url. / delete domain socket file. / ngx_delete_file(saun->sun_path); it seems ngx.socket.tcp would delete socket file every time it connect, and it would cause connect failure with err of "unix:/home/nginx/nginx/server.sock failed (2: No such file or directory)".
so my question is why it delete the socket file?
anybody knows? pls suggest.