mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-08-05 04:45:14 +01:00
Handle device-transfer authentication failures per connection instead of terminating the server.
This commit is contained in:
+2
-2
@@ -104,14 +104,14 @@ final class NetworkServerThread extends Thread {
|
||||
|
||||
outputStream.write(0x53);
|
||||
outputStream.flush();
|
||||
} catch (IOException e) {
|
||||
} catch (IOException | DeviceTransferAuthentication.DeviceTransferAuthenticationException e) {
|
||||
if (!isRunning) {
|
||||
Log.i(TAG, "Server shutting down...");
|
||||
} else if (transferStarted) {
|
||||
Log.w(TAG, "Lost connection after the transfer started, aborting instead of accepting another client.", e);
|
||||
isRunning = false;
|
||||
} else {
|
||||
Log.i(TAG, "Error connecting with client or server socket closed.", e);
|
||||
Log.i(TAG, "Error connecting with or authenticating client, continuing to accept peers.", e);
|
||||
}
|
||||
} finally {
|
||||
StreamUtil.close(clientSocket);
|
||||
|
||||
Reference in New Issue
Block a user