Skip to content

Commit 1cce31c

Browse files
committed
Fix
1 parent c789893 commit 1cce31c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

esp-radio/src/wifi/mod.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,12 +1454,10 @@ pub(crate) fn esp_wifi_send_data(interface: wifi_interface_t, data: &mut [u8]) {
14541454

14551455
state::locked(|| {
14561456
// even checking for !Uninitialized would be enough to not crash
1457-
if interface == wifi_interface_t_WIFI_IF_STA
1458-
&& !matches!(station_state(), WifiStationState::Connected)
1459-
{
1460-
return;
1461-
} else if interface == wifi_interface_t_WIFI_IF_AP
1462-
&& !matches!(access_point_state(), WifiAccessPointState::Started)
1457+
if (interface == wifi_interface_t_WIFI_IF_STA
1458+
&& !matches!(station_state(), WifiStationState::Connected))
1459+
|| (interface == wifi_interface_t_WIFI_IF_AP
1460+
&& !matches!(access_point_state(), WifiAccessPointState::Started))
14631461
{
14641462
return;
14651463
}

0 commit comments

Comments
 (0)