2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2026-06-13 14:38:43 +00:00
This commit is contained in:
2026-06-01 14:24:43 +03:00
parent e1cb60d498
commit f13efe88e0
+9 -1
View File
@@ -945,8 +945,16 @@ public partial class EpConnection : NetworkConnection, IStore
|| _authPacket.Method == EpAuthPacketMethod.ErrorMustEncrypt || _authPacket.Method == EpAuthPacketMethod.ErrorMustEncrypt
|| _authPacket.Method == EpAuthPacketMethod.ErrorRetry) || _authPacket.Method == EpAuthPacketMethod.ErrorRetry)
{ {
var errorMessage = "Authentication error.";
if (_authPacket.Tdu != null)
{
var parsed = Codec.ParseSync(_authPacket.Tdu.Value, _serverWarehouse);
if (parsed is string parsedErrorMsg)
errorMessage = parsedErrorMsg;
}
_invalidCredentials = true; _invalidCredentials = true;
OnError?.Invoke(this, _authPacket.ErrorCode, "Authentication error."); OnError?.Invoke(this, _authPacket.ErrorCode, errorMessage);
_openReply?.TriggerError(new AsyncException(ErrorType.Management, _authPacket.ErrorCode, "Authentication error.")); _openReply?.TriggerError(new AsyncException(ErrorType.Management, _authPacket.ErrorCode, "Authentication error."));
Close(); Close();