diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-01-29 11:18:33 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-02-02 13:33:12 +0000 |
commit | 377024031981694beefdbc23cdf807da486cdf18 (patch) | |
tree | 36b4dae05689c970094a6eb0a986168ef6712ec1 /src/libs | |
parent | 4e1d375dc8f8849582aca147b63432bc9bb3deb4 (diff) |
RemoteServer: Exit early if authorization failed
There's no point in listening to the socket after the
authorization failed. It will then be closed by the client,
anyway.
Change-Id: I26eb2023e08ac3b16ecb894a89ffa0bfeddc62b0
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/installer/remoteserverconnection.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libs/installer/remoteserverconnection.cpp b/src/libs/installer/remoteserverconnection.cpp index 7bd4a45e8..c942b19e3 100644 --- a/src/libs/installer/remoteserverconnection.cpp +++ b/src/libs/installer/remoteserverconnection.cpp @@ -87,8 +87,10 @@ void RemoteServerConnection::run() stream >> key; sendData(stream, (authorized = (key == m_authorizationKey))); socket.flush(); - if (!authorized) + if (!authorized) { socket.close(); + return; + } } else if (authorized) { if (command.isEmpty()) continue; |