mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
update shared guid kick plugin
script plugins reload without error using the correct file share mode when opening increase socket timeout to 10 seconds
This commit is contained in:
@ -39,7 +39,7 @@ namespace SharedLibraryCore.RCon
|
||||
/// <summary>
|
||||
/// timeout in seconds to wait for a socket send or receive before giving up
|
||||
/// </summary>
|
||||
public static readonly int SocketTimeout = 7500;
|
||||
public static readonly int SocketTimeout = 10000;
|
||||
/// <summary>
|
||||
/// interval in milliseconds to wait before sending the next RCon request
|
||||
/// </summary>
|
||||
|
@ -57,7 +57,16 @@ namespace SharedLibraryCore
|
||||
}
|
||||
|
||||
Manager = mgr;
|
||||
string script = File.ReadAllText(FileName);
|
||||
string script;
|
||||
|
||||
using (var stream = new FileStream(FileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
|
||||
{
|
||||
using (var reader = new StreamReader(stream, Encoding.Default))
|
||||
{
|
||||
script = await reader.ReadToEndAsync();
|
||||
}
|
||||
}
|
||||
|
||||
ScriptEngine = new Jint.Engine(cfg =>
|
||||
cfg.AllowClr(new[]
|
||||
{
|
||||
|
Reference in New Issue
Block a user