attempt to fix too many openfiles
This commit is contained in:
parent
732732a728
commit
e63488b5a2
@ -391,9 +391,7 @@ void handle_STOR(struct ftpserver *cfg, struct ftpclient *client, char *path) {
|
|||||||
} else if (pid < 0) {
|
} else if (pid < 0) {
|
||||||
send_msg(client, "451 STOR Failed.\r\n");
|
send_msg(client, "451 STOR Failed.\r\n");
|
||||||
} else {
|
} else {
|
||||||
client->data_socket = -1;
|
close_tcp_connection(client);
|
||||||
memset(client->data_ip, 0, INET6_ADDRSTRLEN);
|
|
||||||
client->data_srv_socket = -1;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
send_msg(client, "553 File Exists.\n");
|
send_msg(client, "553 File Exists.\n");
|
||||||
@ -600,10 +598,7 @@ void handle_RETR(struct ftpserver *cfg, struct ftpclient *client, char *file) {
|
|||||||
|
|
||||||
if (pid > 0) {
|
if (pid > 0) {
|
||||||
// nothing
|
// nothing
|
||||||
client->data_socket = -1;
|
close_tcp_connection(client);
|
||||||
memset(client->data_ip, 0, INET6_ADDRSTRLEN);
|
|
||||||
client->data_srv_socket = -1;
|
|
||||||
|
|
||||||
} else if (pid == 0) {
|
} else if (pid == 0) {
|
||||||
|
|
||||||
if (stat(fullpath, &s) == 0) {
|
if (stat(fullpath, &s) == 0) {
|
||||||
|
Reference in New Issue
Block a user