mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-26 20:54:23 +00:00
Fixed the .NET server shutting down while the runtime still runs (#1237)
This commit is contained in:
1 parent
9ebfce3855
commit
902e406e1d
22 files changed
+923
-115
No files matched your search
@@ -2,15 +2,15 @@
|
||||
|
||||
public sealed partial class RustService
|
||||
{
|
||||
public async Task<string> ReadUserLanguage(bool forceRequest = false)
|
||||
public async Task<string> ReadUserLanguage()
|
||||
{
|
||||
if (!forceRequest && !string.IsNullOrWhiteSpace(this.cachedUserLanguage))
|
||||
if (!string.IsNullOrWhiteSpace(this.cachedUserLanguage))
|
||||
return this.cachedUserLanguage;
|
||||
|
||||
await this.userLanguageLock.WaitAsync();
|
||||
try
|
||||
{
|
||||
if (!forceRequest && !string.IsNullOrWhiteSpace(this.cachedUserLanguage))
|
||||
if (!string.IsNullOrWhiteSpace(this.cachedUserLanguage))
|
||||
return this.cachedUserLanguage;
|
||||
|
||||
var response = await this.http.GetAsync("/system/language");
|
||||
@@ -33,15 +33,15 @@ public sealed partial class RustService
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<string> ReadUserName(bool forceRequest = false)
|
||||
public async Task<string> ReadUserName()
|
||||
{
|
||||
if (!forceRequest && !string.IsNullOrWhiteSpace(this.cachedUserName))
|
||||
if (!string.IsNullOrWhiteSpace(this.cachedUserName))
|
||||
return this.cachedUserName;
|
||||
|
||||
await this.userNameLock.WaitAsync();
|
||||
try
|
||||
{
|
||||
if (!forceRequest && !string.IsNullOrWhiteSpace(this.cachedUserName))
|
||||
if (!string.IsNullOrWhiteSpace(this.cachedUserName))
|
||||
return this.cachedUserName;
|
||||
|
||||
var response = await this.http.GetAsync("/system/username");
|
||||
|
||||
Reference in new issue
Block a user