aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-05-04 22:21:16 +0000
committerGitHub <[email protected]>2023-05-04 22:21:16 +0000
commit705270faaec3db36f9b68a993a099554bb71ae9d (patch)
treed321f990bfc694621c2c97e0fd6af5ebb8675d15 /examples
parent733b83e44f924151035d72806b13c135bd68ba62 (diff)
parent0d8d8d3320ad44eda53d4ac793fb7c9fed03b63a (diff)
Merge pull request #77 from kbleeke/join-error-handling
simple a simple Error type for join instead of looping internally
Diffstat (limited to 'examples')
-rw-r--r--examples/rpi-pico-w/src/bin/tcp_server.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/examples/rpi-pico-w/src/bin/tcp_server.rs b/examples/rpi-pico-w/src/bin/tcp_server.rs
index 036f79308..9581602a7 100644
--- a/examples/rpi-pico-w/src/bin/tcp_server.rs
+++ b/examples/rpi-pico-w/src/bin/tcp_server.rs
@@ -94,8 +94,15 @@ async fn main(spawner: Spawner) {
94 94
95 unwrap!(spawner.spawn(net_task(stack))); 95 unwrap!(spawner.spawn(net_task(stack)));
96 96
97 //control.join_open(env!("WIFI_NETWORK")).await; 97 loop {
98 control.join_wpa2(env!("WIFI_NETWORK"), env!("WIFI_PASSWORD")).await; 98 //control.join_open(env!("WIFI_NETWORK")).await;
99 match control.join_wpa2(env!("WIFI_NETWORK"), env!("WIFI_PASSWORD")).await {
100 Ok(_) => break,
101 Err(err) => {
102 info!("join failed with status={}", err.status);
103 }
104 }
105 }
99 106
100 // And now we can use it! 107 // And now we can use it!
101 108