Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1386)

Unified Diff: remoting/protocol/pepper_session.cc

Issue 8536032: Report correct error when connection cannot be established. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/pepper_session.cc
diff --git a/remoting/protocol/pepper_session.cc b/remoting/protocol/pepper_session.cc
index cb039deb19821f5c1dc280e928a9d707503cf0fc..373bfc3009df75270b767d07ede7b656e2d6bec3 100644
--- a/remoting/protocol/pepper_session.cc
+++ b/remoting/protocol/pepper_session.cc
@@ -284,6 +284,15 @@ void PepperSession::OnTerminate(const JingleMessage& message,
return;
}
+ // TODO(sergeyu): We should return CHANNEL_CONNECTION_ERROR only in
+ // case when |message.reason| is set GENERAL_ERROR, but some legacy
+ // hosts may sent terminate messages with reason set to SUCCESS.
+ if (state_ == CONNECTED) {
+ // Session was connected, but we failed to connect channels.
+ OnError(CHANNEL_CONNECTION_ERROR);
+ return;
+ }
+
CloseInternal(false);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698