Add FtpServer::end() function #283

This commit is contained in:
fvanroie 2022-01-31 20:10:42 +01:00
parent fc9e14a926
commit 665f8b992a

View File

@ -61,15 +61,18 @@ FtpServer::FtpServer(uint16_t _cmdPort, uint16_t _pasvPort) : ftpServer(_cmdPort
void FtpServer::end() void FtpServer::end()
{ {
DEBUG_PRINTLN(F("Stop server!"));
if(client.connected()) { if(client.connected()) {
disconnectClient(); disconnectClient();
} }
ftpServer.end(); ftpServer.end();
dataServer.end(); dataServer.end();
DEBUG_PRINTLN(F("Stop server!"));
cmdStage = FTP_Init; cmdStage = FTP_Stop;
transferStage = FTP_Close;
dataConn = FTP_NoConn;
} }
void FtpServer::begin(const char* _user, const char* _pass, const char* _welcomeMessage) void FtpServer::begin(const char* _user, const char* _pass, const char* _welcomeMessage)