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 {
114114 let mapping = temp_client. connection_properties ( ) . await ;
115115 if let Some ( advertised_host) = mapping. get ( "advertised_host" ) {
116116 if * advertised_host == replica. host . clone ( ) {
117+ client. close ( ) . await ?;
117118 client = temp_client;
118119 break ;
119120 }
120121 }
122+ temp_client. close ( ) . await ?;
121123 }
122124 } else {
123125 client. close ( ) . await ?;
Original file line number Diff line number Diff line change @@ -145,10 +145,12 @@ impl<T> ProducerBuilder<T> {
145145 let mapping = temp_client. connection_properties ( ) . await ;
146146 if let Some ( advertised_host) = mapping. get ( "advertised_host" ) {
147147 if * advertised_host == metadata. leader . host . clone ( ) {
148+ client. close ( ) . await ?;
148149 client = temp_client;
149150 break ;
150151 }
151152 }
153+ temp_client. close ( ) . await ?;
152154 }
153155 } else {
154156 client. close ( ) . await ?;
You can’t perform that action at this time.
0 commit comments