Browse Source

Sometimes telnet spams this sequence

rfm69
Maxim Prokhorov 6 years ago
parent
commit
99311bbe71
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      code/espurna/telnet.ino

+ 2
- 2
code/espurna/telnet.ino View File

@ -67,8 +67,8 @@ void _telnetData(unsigned char clientId, void *data, size_t len) {
// Capture close connection // Capture close connection
char * p = (char *) data; char * p = (char *) data;
// C-d is sent as two bytes
if (len == 2) {
// C-d is sent as two bytes (sometimes repeating)
if (len >= 2) {
if ((p[0] == 0xFF) && (p[1] == 0xEC)) { if ((p[0] == 0xFF) && (p[1] == 0xEC)) {
_telnetClients[clientId]->close(); _telnetClients[clientId]->close();
return; return;


Loading…
Cancel
Save