Lock around LiStartConnection() and LiStopConnection() to fix thread-safety issues. This will hopefully address the crashes seen in 1.0.3 and 1.0.4.

This commit is contained in:
Cameron Gutman
2016-04-12 00:50:59 -04:00
parent 983c65d399
commit 1783abec13
5 changed files with 20 additions and 26 deletions
-9
View File
@@ -91,20 +91,11 @@
[opQueue addOperation:_connection];
}
// This should NEVER be called from within a thread
// owned by moonlight-common
- (void) stopStream
{
[_connection terminate];
}
// This should only be called from within a thread
// owned by moonlight-common
- (void) stopStreamInternal
{
[_connection terminateInternal];
}
- (BOOL) launchApp:(HttpManager*)hMan {
HttpResponse* launchResp = [[HttpResponse alloc] init];
[hMan executeRequestSynchronously:[HttpRequest requestForResponse:launchResp withUrlRequest: