Skip to content

Commit

Permalink
Merge pull request adafruit#6744 from tannewt/wifi_retry_fix
Browse files Browse the repository at this point in the history
Fix retries after successful connection.
  • Loading branch information
dhalbert authored Aug 11, 2022
2 parents 3347ee6 + f9d724c commit f9b9f55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ports/espressif/common-hal/wifi/Radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t
return WIFI_RADIO_ERROR_NO_AP_FOUND;
}
return self->last_disconnect_reason;
} else {
// We're connected, allow us to retry if we get disconnected.
self->retries_left = self->starting_retries;
}
return WIFI_RADIO_ERROR_NONE;
}
Expand Down
3 changes: 0 additions & 3 deletions supervisor/shared/web_workflow/websocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,6 @@ static void _websocket_send(_websocket *ws, const char *text, size_t len) {
_send_raw(&ws->socket, extended_len, 4);
}
_send_raw(&ws->socket, (const uint8_t *)text, len);
char copy[len];
memcpy(copy, text, len);
copy[len] = '\0';
}

void websocket_write(const char *text, size_t len) {
Expand Down

0 comments on commit f9b9f55

Please sign in to comment.