Fixes a potential race condition when reading the Interop port

This commit is contained in:
Cyberboss
2017-06-28 15:10:33 -04:00
parent fb432c8fc3
commit cd8520808e
+4 -1
View File
@@ -407,7 +407,10 @@ namespace TGServerService
try
{
error = null;
return Convert.ToUInt16(File.ReadAllText(InteropConfig));
lock (configLock)
{
return Convert.ToUInt16(File.ReadAllText(InteropConfig));
}
}
catch (Exception e)
{