summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/connection_to_host.cc
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/protocol/connection_to_host.cc')
-rw-r--r--remoting/protocol/connection_to_host.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/remoting/protocol/connection_to_host.cc b/remoting/protocol/connection_to_host.cc
index fe75cfe..580f198 100644
--- a/remoting/protocol/connection_to_host.cc
+++ b/remoting/protocol/connection_to_host.cc
@@ -115,9 +115,6 @@ void ConnectionToHost::InitSession() {
session_manager_.reset(session_manager);
session_manager_->Init(
local_jid_, signal_strategy_.get(), this, NULL, "", allow_nat_traversal_);
-
- // Set the shared-secret for securing SSL channels.
- session_->set_shared_secret(access_code_);
}
const SessionConfig* ConnectionToHost::config() {
@@ -154,6 +151,9 @@ void ConnectionToHost::OnSessionManagerInitialized() {
session_.reset(session_manager_->Connect(
host_jid_, host_public_key_, client_token, candidate_config,
NewCallback(this, &ConnectionToHost::OnSessionStateChange)));
+
+ // Set the shared-secret for securing SSL channels.
+ session_->set_shared_secret(access_code_);
}
void ConnectionToHost::OnIncomingSession(