测试程序可以使用
This commit is contained in:
@@ -350,7 +350,14 @@ static int cmd_pass(lftpd_client_t *client, const char *arg)
|
||||
|
||||
static int cmd_pasv(lftpd_client_t *client, const char *arg)
|
||||
{
|
||||
int listener_socket = lftpd_inet_listen(0);
|
||||
int listener_socket = -1;
|
||||
int retry;
|
||||
|
||||
for (retry = 0; retry < 3; retry++) {
|
||||
listener_socket = lftpd_inet_listen(0);
|
||||
if (listener_socket >= 0) break;
|
||||
vTaskDelay(pdMS_TO_TICKS(200));
|
||||
}
|
||||
if (listener_socket < 0) {
|
||||
send_simple_response(client->socket, 425, STATUS_425);
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user