Skip to content

Commit

Permalink
MT#58352 lb_and_extra_sockets_sync() fix undef extra_socket
Browse files Browse the repository at this point in the history
* $extra_sockets_config can be undef, a check for undef
  and that the value is a HASH ref is added to prevent
  unexpected behaviour

Change-Id: I6914a8d4eddc7f35ba69fe92c7acc130c0475aca
  • Loading branch information
sipwiser committed Oct 17, 2023
1 parent 0f8ad35 commit 9d7fdb3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion helper/sync-db
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ sub lb_and_extra_sockets_sync {

generic_enum_sync(
$dbh,
{ %lb_pairs, %{$extra_sockets_config} },
{ %lb_pairs,
$extra_sockets_config && ref $extra_sockets_config eq 'HASH'
? %{$extra_sockets_config}
: (),
},
$usr_pref, $dom_pref, $peer_pref,
$pref_name
);
Expand Down

0 comments on commit 9d7fdb3

Please sign in to comment.