mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-10-26 14:00:00 +00:00
Use LiInterruptConnection() to terminate connection attempts more quickly
This commit is contained in:
1 parent
e697938afc
commit
67b08cd8b9
1 file changed
+6
@@ -240,6 +240,12 @@ void ClLogMessage(const char* format, ...)
|
|||||||
|
|
||||||
-(void) terminate
|
-(void) terminate
|
||||||
{
|
{
|
||||||
|
// Interrupt any action blocking LiStartConnection(). This is
|
||||||
|
// thread-safe and done outside initLock on purpose, since we
|
||||||
|
// won't be able to acquire it if LiStartConnection is in
|
||||||
|
// progress.
|
||||||
|
LiInterruptConnection();
|
||||||
|
|
||||||
// We dispatch this async to get out because this can be invoked
|
// We dispatch this async to get out because this can be invoked
|
||||||
// on a thread inside common and we don't want to deadlock. It also avoids
|
// on a thread inside common and we don't want to deadlock. It also avoids
|
||||||
// blocking on the caller's thread waiting to acquire initLock.
|
// blocking on the caller's thread waiting to acquire initLock.
|
||||||
|
|||||||
Reference in new issue
Block a user