Update service URI
This commit is contained in:
@@ -343,6 +343,11 @@ public class ServerConfigurationManager
|
|||||||
for (int i = 0; i < _configService.Current.ServerStorage.Count; ++i)
|
for (int i = 0; i < _configService.Current.ServerStorage.Count; ++i)
|
||||||
{
|
{
|
||||||
var x = _configService.Current.ServerStorage[i];
|
var x = _configService.Current.ServerStorage[i];
|
||||||
|
if (x.ServerUri.Equals(ApiController.LoporritServiceUriOld, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
_logger.LogDebug("Updating server URI {old} => {new}", x.ServerUri, ApiController.LoporritServiceUri);
|
||||||
|
x.ServerUri = _configService.Current.ServerStorage[i].ServerUri = ApiController.LoporritServiceUri;
|
||||||
|
}
|
||||||
if (x.ServerUri.Equals(ApiController.LoporritServiceUri, StringComparison.OrdinalIgnoreCase))
|
if (x.ServerUri.Equals(ApiController.LoporritServiceUri, StringComparison.OrdinalIgnoreCase))
|
||||||
lopExists = true;
|
lopExists = true;
|
||||||
if (x.ServerUri.Equals(ApiController.MainServiceUri, StringComparison.OrdinalIgnoreCase))
|
if (x.ServerUri.Equals(ApiController.MainServiceUri, StringComparison.OrdinalIgnoreCase))
|
||||||
@@ -350,14 +355,14 @@ public class ServerConfigurationManager
|
|||||||
}
|
}
|
||||||
if (mainIdx >= 0)
|
if (mainIdx >= 0)
|
||||||
{
|
{
|
||||||
_logger.LogDebug("Removing main server {ApiController.MainServiceUri}");
|
_logger.LogDebug("Removing main server {uri}", ApiController.MainServiceUri);
|
||||||
_configService.Current.ServerStorage.RemoveAt(mainIdx);
|
_configService.Current.ServerStorage.RemoveAt(mainIdx);
|
||||||
if (_configService.Current.CurrentServer >= mainIdx)
|
if (_configService.Current.CurrentServer >= mainIdx)
|
||||||
_configService.Current.CurrentServer--;
|
_configService.Current.CurrentServer--;
|
||||||
}
|
}
|
||||||
if (!lopExists)
|
if (!lopExists)
|
||||||
{
|
{
|
||||||
_logger.LogDebug("Re-adding missing server {ApiController.LoporritServiceUri}");
|
_logger.LogDebug("Re-adding missing server {uri}", ApiController.LoporritServiceUri);
|
||||||
_configService.Current.ServerStorage.Insert(0, new ServerStorage() { ServerUri = ApiController.LoporritServiceUri, ServerName = ApiController.LoporritServer });
|
_configService.Current.ServerStorage.Insert(0, new ServerStorage() { ServerUri = ApiController.LoporritServiceUri, ServerName = ApiController.LoporritServer });
|
||||||
if (_configService.Current.CurrentServer >= 0)
|
if (_configService.Current.CurrentServer >= 0)
|
||||||
_configService.Current.CurrentServer++;
|
_configService.Current.CurrentServer++;
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ namespace MareSynchronos.WebAPI;
|
|||||||
public sealed partial class ApiController : DisposableMediatorSubscriberBase, IMareHubClient
|
public sealed partial class ApiController : DisposableMediatorSubscriberBase, IMareHubClient
|
||||||
{
|
{
|
||||||
public const string LoporritServer = "Loporrit Main Server";
|
public const string LoporritServer = "Loporrit Main Server";
|
||||||
public const string LoporritServiceUri = "wss://loporrit.us.to";
|
public const string LoporritServiceUri = "wss://lop-sync.com";
|
||||||
|
public const string LoporritServiceUriOld = "wss://loporrit.us.to";
|
||||||
public const string MainServer = "Lunae Crescere Incipientis (Central Server EU)";
|
public const string MainServer = "Lunae Crescere Incipientis (Central Server EU)";
|
||||||
public const string MainServiceUri = "wss://maresynchronos.com";
|
public const string MainServiceUri = "wss://maresynchronos.com";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user