summaryrefslogtreecommitdiffstats
path: root/lib/network
diff options
context:
space:
mode:
Diffstat (limited to 'lib/network')
-rw-r--r--lib/network/connection/wireless.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/network/connection/wireless.pm b/lib/network/connection/wireless.pm
index 20ebd8d..d6d5872 100644
--- a/lib/network/connection/wireless.pm
+++ b/lib/network/connection/wireless.pm
@@ -702,9 +702,12 @@ sub connect {
$self->SUPER::connect;
if ($self->{control}{roaming}) {
- refresh_roaming_ids($self);
- my $network = $self->get_selected_network;
- my $network_id = $network->{id} if $network && defined $network->{id};
+ my $network_id;
+ foreach (0 .. 1) {
+ refresh_roaming_ids($self) if $_;
+ my $network = $self->get_selected_network;
+ $network_id = $network->{id} if $network && defined $network->{id};
+ }
if (defined $network_id) {
if ($net->{monitor}) {
eval { $net->{monitor}->select_network($network_id) };