Cleaning the object destructor and stop method

This commit is contained in:
Th3maz1ng 2020-04-25 11:59:56 +02:00
parent b2b0170c01
commit 674577605d

View File

@ -52,9 +52,19 @@ class FTPServer : public TCPServer<T>
virtual ~FTPServer()
{
_dataServer.stop();
free(_login); free(_password);
}
virtual void stop()
{
if(TCPServer<T>::_serverStarted)
{
_dataServer.stop();
TCPServer<T>::stop();
}
}
protected:
virtual T* createNewClient(WiFiClient wc)
{