mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-04-20 03:24:50 +00:00
Chromecast socket crash fix.
This commit is contained in:
parent
e47349d010
commit
d245e20b14
1 changed files with 2 additions and 1 deletions
|
@ -314,6 +314,7 @@ class ChromecastCastingDevice : CastingDevice {
|
|||
connectionState = CastConnectionState.CONNECTING;
|
||||
|
||||
try {
|
||||
_socket?.close()
|
||||
_socket = factory.createSocket(usedRemoteAddress, port) as SSLSocket;
|
||||
_socket?.startHandshake();
|
||||
Logger.i(TAG, "Successfully connected to Chromecast at $usedRemoteAddress:$port");
|
||||
|
@ -324,7 +325,7 @@ class ChromecastCastingDevice : CastingDevice {
|
|||
} catch (e: Throwable) {
|
||||
Logger.i(TAG, "Failed to authenticate to Chromecast.", e);
|
||||
}
|
||||
} catch (e: IOException) {
|
||||
} catch (e: Throwable) {
|
||||
_socket?.close();
|
||||
Logger.i(TAG, "Failed to connect to Chromecast.", e);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue