File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed
Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -78,14 +78,23 @@ void SessionsWorker::onBeforeThreadRunning()
7878 self_task_runner_ = thread_->taskRunner ();
7979 DCHECK (self_task_runner_);
8080
81- std::error_code error_code;
82- asio::ip::address listen_address =
83- asio::ip::make_address (base::local8BitFromUtf16 (listen_interface_), error_code);
84- if (error_code)
81+ asio::ip::address listen_address;
82+
83+ if (!listen_interface_.empty ())
8584 {
86- LOG (LS_ERROR) << " Unable to get listen address: "
87- << base::utf16FromLocal8Bit (error_code.message ());
88- return ;
85+ std::error_code error_code;
86+ listen_address = asio::ip::make_address (
87+ base::local8BitFromUtf16 (listen_interface_), error_code);
88+ if (error_code)
89+ {
90+ LOG (LS_ERROR) << " Unable to get listen address: "
91+ << base::utf16FromLocal8Bit (error_code.message ());
92+ return ;
93+ }
94+ }
95+ else
96+ {
97+ listen_address = asio::ip::address_v6::any ();
8998 }
9099
91100 session_manager_ = std::make_unique<SessionManager>(
You can’t perform that action at this time.
0 commit comments