webdriver: Don't return existing session id when the wrong one is supplied (#99)

Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: dae3f0689a1d589d10225d558e0528fb232a3842

committer: Andreas Tolfsen <ato@mozilla.com>

--HG--
extra : subtree_source : http%3A//tristan.corp.lon2.mozilla.com%3A8000
extra : subtree_revision : 3e07d0db86bf8e61d28cc43ad77b9b4f3b74684f
This commit is contained in:
jgraham 2017-06-01 08:17:13 +01:00
parent 73d6e8dbb9
commit 353c4ddf26

View File

@ -105,9 +105,8 @@ impl<T: WebDriverHandler<U>, U: WebDriverExtensionRoute> Dispatcher<T, U> {
if existing_session.id != *msg_session_id {
Err(WebDriverError::new(
ErrorStatus::InvalidSessionId,
format!("Got unexpected session id {} expected {}",
msg_session_id,
existing_session.id)))
format!("Got unexpected session id {}",
msg_session_id)))
} else {
Ok(())
}