mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
fix: direct server clients now have unique client IDs
Using the generated security token as an ID was presenting problems with duplicate connections using the same ID and trying to figure out where to send the messages. Now, the clients have a unique ID that's an increasing integer that restarts at 1 when the program restarts.
This commit is contained in:
parent
1197b15a33
commit
8525134ae7
10 changed files with 444 additions and 255 deletions
|
|
@ -1382,33 +1382,13 @@ namespace PepperDash.Essentials
|
|||
{
|
||||
Log =
|
||||
{
|
||||
Output = (data, message) =>
|
||||
{
|
||||
switch (data.Level)
|
||||
{
|
||||
case LogLevel.Trace:
|
||||
this.LogVerbose(data.Message);
|
||||
break;
|
||||
case LogLevel.Debug:
|
||||
this.LogDebug(data.Message);
|
||||
break;
|
||||
case LogLevel.Info:
|
||||
this.LogInformation(data.Message);
|
||||
break;
|
||||
case LogLevel.Warn:
|
||||
this.LogWarning(data.Message);
|
||||
break;
|
||||
case LogLevel.Error:
|
||||
this.LogError(data.Message);
|
||||
break;
|
||||
case LogLevel.Fatal:
|
||||
this.LogFatal(data.Message);
|
||||
break;
|
||||
}
|
||||
}
|
||||
Output = (data, message) => Utilities.ConvertWebsocketLog(data, message, this)
|
||||
}
|
||||
};
|
||||
|
||||
// setting to trace to let level be controlled by appdebug
|
||||
_wsClient2.Log.Level = LogLevel.Trace;
|
||||
|
||||
_wsClient2.SslConfiguration.EnabledSslProtocols =
|
||||
System.Security.Authentication.SslProtocols.Tls11
|
||||
| System.Security.Authentication.SslProtocols.Tls12;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue