Skip to content

Commit f1a6d2f

Browse files
committed
clrcore: disable SetSynchronizationContext for the server
Using this led to weird thread affinity issues when a resource was started from the server thread (as in, post-initialization). See https://forum.fivem.net/t/153950 for more information.
1 parent 6f95abe commit f1a6d2f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

code/client/clrcore/InternalManager.cs

+2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ public InternalManager()
3131
InitializeAssemblyResolver();
3232
CitizenTaskScheduler.Create();
3333

34+
#if !IS_FXSERVER
3435
SynchronizationContext.SetSynchronizationContext(new CitizenSynchronizationContext());
36+
#endif
3537
}
3638

3739
[SecuritySafeCritical]

0 commit comments

Comments
 (0)