JoaoLopesF / RemoteDebug

Library for Arduino to debug projects over WiFi, with web app or telnet, with print commands like Serial Monitor
MIT License
613 stars 127 forks source link

If telnet password is set the timeout due to inactivity is always set to 1 min #37

Closed achuchev closed 5 years ago

achuchev commented 5 years ago

Looking at the code below the telnet connection will be closed after 1 min of inactivity even when MAX_TIME_INACTIVE is set to different value.

`

ifdef MAX_TIME_INACTIVE

    // Inactivity - close connection if not received commands from user in telnet
    // For reduce overheads

    uint32_t maxTime = MAX_TIME_INACTIVE; // Normal

    if (_password != "") { // Request password - 18/08/08
        maxTime = 60000; // One minute to password
    }

    if ((millis() - _lastTimeCommand) > maxTime) {
        TelnetClient.println("* Closing session by inactivity");
        TelnetClient.stop();
        _connected = false;
        _silence = false;
    }

endif`

JoaoLopesF commented 5 years ago

Hi @achuchev

Please download lastest version with this fixed

Thanks for your feedback

achuchev commented 5 years ago

@JoaoLopesF Yes, it works!