Fixed bad ternary operator which did not behave as expected :-(

This commit is contained in:
anschrammh 2022-10-04 20:01:38 +02:00
parent 3583a010a7
commit a23fb4cba9

View File

@ -63,7 +63,16 @@ class TCPServer
{ {
if(!_serverStarted) if(!_serverStarted)
{ {
!port ? _wifiServer.begin(_port) : _wifiServer.begin(port, backlog), _port = port ; if(port)
{
_port = port;
_wifiServer.begin(_port, backlog);
}
else
{
_wifiServer.begin(_port);
}
_serverStarted = true; _serverStarted = true;
} }
} }