File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -114,10 +114,12 @@ impl ConsumerBuilder {
114
114
let mapping = temp_client. connection_properties ( ) . await ;
115
115
if let Some ( advertised_host) = mapping. get ( "advertised_host" ) {
116
116
if * advertised_host == replica. host . clone ( ) {
117
+ client. close ( ) . await ?;
117
118
client = temp_client;
118
119
break ;
119
120
}
120
121
}
122
+ temp_client. close ( ) . await ?;
121
123
}
122
124
} else {
123
125
client. close ( ) . await ?;
Original file line number Diff line number Diff line change @@ -145,10 +145,12 @@ impl<T> ProducerBuilder<T> {
145
145
let mapping = temp_client. connection_properties ( ) . await ;
146
146
if let Some ( advertised_host) = mapping. get ( "advertised_host" ) {
147
147
if * advertised_host == metadata. leader . host . clone ( ) {
148
+ client. close ( ) . await ?;
148
149
client = temp_client;
149
150
break ;
150
151
}
151
152
}
153
+ temp_client. close ( ) . await ?;
152
154
}
153
155
} else {
154
156
client. close ( ) . await ?;
You can’t perform that action at this time.
0 commit comments