File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -844,7 +844,7 @@ impl FromStr for BindServer {
844
844
} else if addr. is_none ( ) {
845
845
addr = Some ( part) ;
846
846
} else {
847
- error ! ( "repeat addr " ) ;
847
+ error ! ( "unexpected options: {}" , part ) ;
848
848
}
849
849
}
850
850
@@ -1640,14 +1640,15 @@ mod parse {
1640
1640
) ;
1641
1641
}
1642
1642
1643
- match self
1644
- . servers
1645
- . entry ( server. group . clone ( ) . unwrap_or ( "default" . to_string ( ) ) )
1646
- {
1647
- Entry :: Occupied ( g) => g. into_mut ( ) ,
1648
- Entry :: Vacant ( g) => g. insert ( vec ! [ ] ) ,
1643
+ if let Some ( group) = server. group . as_deref ( ) {
1644
+ match self . servers . entry ( group. to_string ( ) ) {
1645
+ Entry :: Occupied ( g) => g. into_mut ( ) ,
1646
+ Entry :: Vacant ( g) => g. insert ( vec ! [ ] ) ,
1647
+ }
1648
+ . push ( server) ;
1649
+ } else if server. exclude_default_group {
1650
+ warn ! ( "group name required when `-exclude_default_group` enabled" ) ;
1649
1651
}
1650
- . push ( server) ;
1651
1652
}
1652
1653
}
1653
1654
You can’t perform that action at this time.
0 commit comments