File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -130,17 +130,23 @@ tcp::endpoint inlet_connection::get_tcp_endpoint() {
130130 shared_lock_t lock (host_info_mut_);
131131 if (tcp_protocol_ == tcp::v4 ())
132132 return tcp::endpoint (ip::make_address (host_info_.v4address ()), host_info_.v4data_port ());
133- else
134- return tcp::endpoint (resolve_v6_addr (host_info_.v6address ()), host_info_.v6data_port ());
133+
134+ std::string addr = host_info_.v6address ();
135+ uint16_t port = host_info_.v6data_port ();
136+ lock.unlock ();
137+ return tcp::endpoint (resolve_v6_addr (addr), port);
135138}
136139
137140udp::endpoint inlet_connection::get_udp_endpoint () {
138141 shared_lock_t lock (host_info_mut_);
139142
140143 if (udp_protocol_ == udp::v4 ())
141144 return udp::endpoint (ip::make_address (host_info_.v4address ()), host_info_.v4service_port ());
142- else
143- return udp::endpoint (resolve_v6_addr (host_info_.v6address ()), host_info_.v6service_port ());
145+
146+ std::string addr = host_info_.v6address ();
147+ uint16_t port = host_info_.v6service_port ();
148+ lock.unlock ();
149+ return udp::endpoint (resolve_v6_addr (addr), port);
144150}
145151
146152std::string inlet_connection::current_uid () {
You can’t perform that action at this time.
0 commit comments