Merge remote-tracking branch 'origin/main'

This commit is contained in:
Hosted Weblate 2022-08-11 21:42:29 +02:00
commit 0d4ad2ff52
No known key found for this signature in database
GPG Key ID: A3FAAA06E6569B4C
2 changed files with 3 additions and 3 deletions

View File

@ -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 WIFI_RADIO_ERROR_NO_AP_FOUND;
} }
return self->last_disconnect_reason; 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; return WIFI_RADIO_ERROR_NONE;
} }

View File

@ -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, extended_len, 4);
} }
_send_raw(&ws->socket, (const uint8_t *)text, len); _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) { void websocket_write(const char *text, size_t len) {