mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 04:58:45 +00:00
Close the SVR2 socket when we're done.
This commit is contained in:
@@ -117,6 +117,8 @@ internal class Svr2Socket(
|
||||
Stage.WAITING_FOR_RESPONSE -> {
|
||||
Log.d(TAG, "[onMessage] Received response for our request.")
|
||||
emitSuccess(Svr2Response.ADAPTER.decode(client.establishedRecv(bytes.toByteArray())))
|
||||
Log.d(TAG, "[onMessage] Success! Closing.")
|
||||
webSocket.close(1000, "OK")
|
||||
}
|
||||
|
||||
Stage.CLOSED -> {
|
||||
@@ -134,7 +136,7 @@ internal class Svr2Socket(
|
||||
emitError(e)
|
||||
} catch (e: AttestationDataException) {
|
||||
Log.w(TAG, e)
|
||||
webSocket.close(1000, "OK")
|
||||
webSocket.close(1007, "OK")
|
||||
emitError(IOException(e))
|
||||
} catch (e: SgxCommunicationFailureException) {
|
||||
Log.w(TAG, e)
|
||||
|
||||
Reference in New Issue
Block a user