Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
fa8a5b57
Commit
fa8a5b57
authored
Mar 08, 2016
by
DeepakVerma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SE.Redis surface error information
parent
23beb2f6
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
154 additions
and
76 deletions
+154
-76
ConnectionFailedErrors.cs
StackExchange.Redis.Tests/ConnectionFailedErrors.cs
+13
-34
ExceptionFactoryTests.cs
StackExchange.Redis.Tests/ExceptionFactoryTests.cs
+113
-0
ConnectionFailureType.cs
...change.Redis/StackExchange/Redis/ConnectionFailureType.cs
+1
-1
ConnectionMultiplexer.cs
...change.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
+4
-4
ExceptionFactory.cs
StackExchange.Redis/StackExchange/Redis/ExceptionFactory.cs
+16
-26
PhysicalBridge.cs
StackExchange.Redis/StackExchange/Redis/PhysicalBridge.cs
+1
-2
RedisBatch.cs
StackExchange.Redis/StackExchange/Redis/RedisBatch.cs
+2
-2
RedisServer.cs
StackExchange.Redis/StackExchange/Redis/RedisServer.cs
+2
-2
ResultProcessor.cs
StackExchange.Redis/StackExchange/Redis/ResultProcessor.cs
+1
-1
ServerEndPoint.cs
StackExchange.Redis/StackExchange/Redis/ServerEndPoint.cs
+1
-4
No files found.
StackExchange.Redis.Tests/ConnectionFailedErrors.cs
View file @
fa8a5b57
using
System
;
using
System.Collections.Generic
;
using
System.Diagnostics
;
using
System.IO
;
using
System.Linq
;
using
System.Security.Cryptography.X509Certificates
;
using
NUnit.Framework
;
using
NUnit.Framework
;
using
System.Threading
;
namespace
StackExchange.Redis.Tests
...
...
@@ -30,21 +24,15 @@ public void SSLCertificateValidationError(bool isCertValidationSucceeded)
{
connection
.
ConnectionFailed
+=
(
object
sender
,
ConnectionFailedEventArgs
e
)
=>
{
Assert
.
That
(
e
.
FailureType
.
ToString
(),
Is
.
EqualTo
(
ConnectionFailureType
.
AuthenticationFailure
.
ToString
()
));
Assert
.
That
(
e
.
FailureType
,
Is
.
EqualTo
(
ConnectionFailureType
.
AuthenticationFailure
));
};
if
(!
isCertValidationSucceeded
)
{
//validate that in this case it throws an certificatevalidation exception
var
ex
=
Assert
.
Throws
<
RedisConnectionException
>(()
=>
connection
.
GetDatabase
().
Ping
());
((
AggregateException
)
ex
.
InnerException
).
Handle
(
e
=>
{
var
rde
=
(
RedisConnectionException
)
e
;
Assert
.
That
(
rde
.
FailureType
.
ToString
(),
Is
.
EqualTo
(
ConnectionFailureType
.
AuthenticationFailure
.
ToString
()));
Assert
.
That
(
rde
.
InnerException
.
Message
,
Is
.
EqualTo
(
"The remote certificate is invalid according to the validation procedure."
));
return
e
is
RedisConnectionException
;
});
var
rde
=
(
RedisConnectionException
)
ex
.
InnerException
;
Assert
.
That
(
rde
.
FailureType
,
Is
.
EqualTo
(
ConnectionFailureType
.
AuthenticationFailure
));
Assert
.
That
(
rde
.
InnerException
.
Message
,
Is
.
EqualTo
(
"The remote certificate is invalid according to the validation procedure."
));
}
else
{
...
...
@@ -72,17 +60,12 @@ public void AuthenticationFailureError()
{
muxer
.
ConnectionFailed
+=
(
object
sender
,
ConnectionFailedEventArgs
e
)
=>
{
Assert
.
That
(
e
.
FailureType
.
ToString
(),
Is
.
EqualTo
(
ConnectionFailureType
.
AuthenticationFailure
.
ToString
()
));
Assert
.
That
(
e
.
FailureType
,
Is
.
EqualTo
(
ConnectionFailureType
.
AuthenticationFailure
));
};
var
ex
=
Assert
.
Throws
<
RedisConnectionException
>(()
=>
muxer
.
GetDatabase
().
Ping
());
((
AggregateException
)
ex
.
InnerException
).
Handle
(
e
=>
{
var
rde
=
(
RedisConnectionException
)
e
;
Assert
.
That
(
rde
.
FailureType
.
ToString
(),
Is
.
EqualTo
(
ConnectionFailureType
.
AuthenticationFailure
.
ToString
()));
return
e
is
RedisConnectionException
;
});
var
rde
=
(
RedisConnectionException
)
ex
.
InnerException
;
Assert
.
That
(
rde
.
FailureType
,
Is
.
EqualTo
(
ConnectionFailureType
.
AuthenticationFailure
));
Assert
.
That
(
rde
.
InnerException
.
Message
,
Is
.
EqualTo
(
"Error: NOAUTH Authentication required. Verify if the Redis password provided is correct."
));
//wait for a second for connectionfailed event to fire
Thread
.
Sleep
(
1000
);
}
...
...
@@ -99,12 +82,8 @@ public void SocketFailureError()
using
(
var
muxer
=
ConnectionMultiplexer
.
Connect
(
options
))
{
var
ex
=
Assert
.
Throws
<
RedisConnectionException
>(()
=>
muxer
.
GetDatabase
().
Ping
());
((
AggregateException
)
ex
.
InnerException
).
Handle
(
e
=>
{
var
rde
=
(
RedisConnectionException
)
e
;
Assert
.
That
(
rde
.
FailureType
.
ToString
(),
Is
.
EqualTo
(
ConnectionFailureType
.
SocketFailure
.
ToString
()));
return
e
is
RedisConnectionException
;
});
var
rde
=
(
RedisConnectionException
)
ex
.
InnerException
;
Assert
.
That
(
rde
.
FailureType
,
Is
.
EqualTo
(
ConnectionFailureType
.
SocketFailure
));
}
}
...
...
@@ -123,13 +102,13 @@ public void CheckFailureRecovered()
server
.
SimulateConnectionFailure
();
Assert
.
AreEqual
(
ConnectionFailureType
.
SocketFailure
,
((
RedisConnectionException
)
muxer
.
GetServerSnap
S
hot
()[
0
].
LastException
).
FailureType
);
Assert
.
AreEqual
(
ConnectionFailureType
.
SocketFailure
,
((
RedisConnectionException
)
muxer
.
GetServerSnap
s
hot
()[
0
].
LastException
).
FailureType
);
// should reconnect within 1 keepalive interval
muxer
.
AllowConnect
=
true
;
Thread
.
Sleep
(
2000
);
Assert
.
Null
(
muxer
.
GetServerSnap
S
hot
()[
0
].
LastException
);
Assert
.
Null
(
muxer
.
GetServerSnap
s
hot
()[
0
].
LastException
);
}
}
finally
...
...
StackExchange.Redis.Tests/ExceptionFactoryTests.cs
0 → 100644
View file @
fa8a5b57
using
System
;
using
NUnit.Framework
;
namespace
StackExchange.Redis.Tests
{
[
TestFixture
]
public
class
ExceptionFactoryTests
:
TestBase
{
[
Test
]
public
void
NullLastException
()
{
using
(
var
muxer
=
Create
(
keepAlive
:
1
,
connectTimeout
:
10000
,
allowAdmin
:
true
))
{
var
conn
=
muxer
.
GetDatabase
();
Assert
.
Null
(
muxer
.
GetServerSnapshot
()[
0
].
LastException
);
var
ex
=
ExceptionFactory
.
NoConnectionAvailable
(
true
,
new
RedisCommand
(),
null
,
null
,
muxer
.
GetServerSnapshot
());
Assert
.
Null
(
ex
.
InnerException
);
}
}
[
Test
]
public
void
NullSnapshot
()
{
var
ex
=
ExceptionFactory
.
NoConnectionAvailable
(
true
,
new
RedisCommand
(),
null
,
null
,
null
);
Assert
.
Null
(
ex
.
InnerException
);
}
[
Test
]
public
void
MultipleEndpointsThrowAggregateException
()
{
try
{
using
(
var
muxer
=
Create
(
keepAlive
:
1
,
connectTimeout
:
10000
,
allowAdmin
:
true
))
{
var
conn
=
muxer
.
GetDatabase
();
muxer
.
AllowConnect
=
false
;
SocketManager
.
ConnectCompletionType
=
CompletionType
.
Async
;
foreach
(
var
endpoint
in
muxer
.
GetEndPoints
())
{
muxer
.
GetServer
(
endpoint
).
SimulateConnectionFailure
();
}
var
ex
=
ExceptionFactory
.
NoConnectionAvailable
(
true
,
new
RedisCommand
(),
null
,
null
,
muxer
.
GetServerSnapshot
());
Assert
.
IsInstanceOf
<
RedisConnectionException
>(
ex
);
Assert
.
IsInstanceOf
<
AggregateException
>(
ex
.
InnerException
);
var
aggException
=
(
AggregateException
)
ex
.
InnerException
;
Assert
.
That
(
aggException
.
InnerExceptions
.
Count
,
Is
.
EqualTo
(
2
));
for
(
int
i
=
0
;
i
<
aggException
.
InnerExceptions
.
Count
;
i
++)
{
Assert
.
That
(((
RedisConnectionException
)
aggException
.
InnerExceptions
[
i
]).
FailureType
,
Is
.
EqualTo
(
ConnectionFailureType
.
SocketFailure
));
}
}
}
finally
{
SocketManager
.
ConnectCompletionType
=
CompletionType
.
Any
;
ClearAmbientFailures
();
}
}
[
Test
]
public
void
NullInnerExceptionForMultipleEndpointsWithNoLastException
()
{
try
{
using
(
var
muxer
=
Create
(
keepAlive
:
1
,
connectTimeout
:
10000
,
allowAdmin
:
true
))
{
var
conn
=
muxer
.
GetDatabase
();
muxer
.
AllowConnect
=
false
;
SocketManager
.
ConnectCompletionType
=
CompletionType
.
Async
;
var
ex
=
ExceptionFactory
.
NoConnectionAvailable
(
true
,
new
RedisCommand
(),
null
,
null
,
muxer
.
GetServerSnapshot
());
Assert
.
IsInstanceOf
<
RedisConnectionException
>(
ex
);
Assert
.
Null
(
ex
.
InnerException
);
}
}
finally
{
SocketManager
.
ConnectCompletionType
=
CompletionType
.
Any
;
ClearAmbientFailures
();
}
}
[
Test
]
public
void
ServerTakesPrecendenceOverSnapshot
()
{
try
{
using
(
var
muxer
=
Create
(
keepAlive
:
1
,
connectTimeout
:
10000
,
allowAdmin
:
true
))
{
var
conn
=
muxer
.
GetDatabase
();
muxer
.
AllowConnect
=
false
;
SocketManager
.
ConnectCompletionType
=
CompletionType
.
Async
;
muxer
.
GetServer
(
muxer
.
GetEndPoints
()[
0
]).
SimulateConnectionFailure
();
var
ex
=
ExceptionFactory
.
NoConnectionAvailable
(
true
,
new
RedisCommand
(),
null
,
muxer
.
GetServerSnapshot
()[
0
],
muxer
.
GetServerSnapshot
());
Assert
.
IsInstanceOf
<
RedisConnectionException
>(
ex
);
Assert
.
IsInstanceOf
<
Exception
>(
ex
.
InnerException
);
Assert
.
That
(
muxer
.
GetServerSnapshot
()[
0
].
LastException
,
Is
.
EqualTo
(
ex
.
InnerException
));
}
}
finally
{
SocketManager
.
ConnectCompletionType
=
CompletionType
.
Any
;
ClearAmbientFailures
();
}
}
}
}
StackExchange.Redis/StackExchange/Redis/ConnectionFailureType.cs
View file @
fa8a5b57
...
...
@@ -18,7 +18,7 @@ public enum ConnectionFailureType
/// </summary>
SocketFailure
,
/// <summary>
///
The connection did not authenticate correctly
///
Either SSL Stream or Redis authentication failed
/// </summary>
AuthenticationFailure
,
/// <summary>
...
...
StackExchange.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
View file @
fa8a5b57
...
...
@@ -295,7 +295,7 @@ internal void MakeMaster(ServerEndPoint server, ReplicationChangeOptions options
if
(
server
==
null
)
throw
new
ArgumentNullException
(
nameof
(
server
));
var
srv
=
new
RedisServer
(
this
,
server
,
null
);
if
(!
srv
.
IsConnected
)
throw
ExceptionFactory
.
NoConnectionAvailable
(
IncludeDetailInExceptions
,
RedisCommand
.
SLAVEOF
,
null
,
server
,
GetServerSnap
S
hot
());
if
(!
srv
.
IsConnected
)
throw
ExceptionFactory
.
NoConnectionAvailable
(
IncludeDetailInExceptions
,
RedisCommand
.
SLAVEOF
,
null
,
server
,
GetServerSnap
s
hot
());
if
(
log
==
null
)
log
=
TextWriter
.
Null
;
CommandMap
.
AssertAvailable
(
RedisCommand
.
SLAVEOF
);
...
...
@@ -1657,7 +1657,7 @@ internal void UpdateClusterRange(ClusterConfiguration configuration)
private
readonly
ServerSelectionStrategy
serverSelectionStrategy
;
internal
ServerEndPoint
[]
GetServerSnap
S
hot
()
internal
ServerEndPoint
[]
GetServerSnap
s
hot
()
{
var
tmp
=
serverSnapshot
;
return
tmp
;
...
...
@@ -1872,7 +1872,7 @@ internal Task<T> ExecuteAsyncImpl<T>(Message message, ResultProcessor<T> process
var
source
=
ResultBox
<
T
>.
Get
(
tcs
);
if
(!
TryPushMessageToBridge
(
message
,
processor
,
source
,
ref
server
))
{
ThrowFailed
(
tcs
,
ExceptionFactory
.
NoConnectionAvailable
(
IncludeDetailInExceptions
,
message
.
Command
,
message
,
server
,
GetServerSnap
S
hot
()));
ThrowFailed
(
tcs
,
ExceptionFactory
.
NoConnectionAvailable
(
IncludeDetailInExceptions
,
message
.
Command
,
message
,
server
,
GetServerSnap
s
hot
()));
}
return
tcs
.
Task
;
}
...
...
@@ -1913,7 +1913,7 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser
{
if
(!
TryPushMessageToBridge
(
message
,
processor
,
source
,
ref
server
))
{
throw
ExceptionFactory
.
NoConnectionAvailable
(
IncludeDetailInExceptions
,
message
.
Command
,
message
,
server
,
GetServerSnap
S
hot
());
throw
ExceptionFactory
.
NoConnectionAvailable
(
IncludeDetailInExceptions
,
message
.
Command
,
message
,
server
,
GetServerSnap
s
hot
());
}
if
(
Monitor
.
Wait
(
source
,
timeoutMilliseconds
))
...
...
StackExchange.Redis/StackExchange/Redis/ExceptionFactory.cs
View file @
fa8a5b57
...
...
@@ -85,9 +85,8 @@ internal static Exception NoConnectionAvailable(bool includeDetail, RedisCommand
//otherwise it would output state of all the endpoints
serverSnapshot
=
new
ServerEndPoint
[]
{
server
};
}
List
<
Exception
>
data
;
string
exceptionmessage
=
"No connection is available to service this operation: "
+
s
+
GetServerSnapShotLabel
(
serverSnapshot
,
out
data
);
var
ex
=
new
RedisConnectionException
(
ConnectionFailureType
.
UnableToResolvePhysicalConnection
,
exceptionmessage
,
new
AggregateException
(
data
));
string
exceptionmessage
=
"No connection is available to service this operation: "
+
s
;
var
ex
=
new
RedisConnectionException
(
ConnectionFailureType
.
UnableToResolvePhysicalConnection
,
exceptionmessage
,
GetServerSnapshotInnerExceptions
(
serverSnapshot
));
if
(
includeDetail
)
{
AddDetail
(
ex
,
message
,
server
,
s
);
...
...
@@ -95,37 +94,29 @@ internal static Exception NoConnectionAvailable(bool includeDetail, RedisCommand
return
ex
;
}
internal
static
string
GetServerSnapShotLabel
(
ServerEndPoint
[]
serverSnapshot
,
out
List
<
Exception
>
data
)
internal
static
Exception
GetServerSnapshotInnerExceptions
(
ServerEndPoint
[]
serverSnapshot
)
{
List
<
Exception
>
exceptions
=
new
List
<
Exception
>();
StringBuilder
connectionStateSummary
=
new
StringBuilder
();
Action
<
string
,
string
>
add
=
(
k
,
v
)
=>
{
connectionStateSummary
.
Append
(
"; "
);
connectionStateSummary
.
Append
(
k
);
connectionStateSummary
.
Append
(
":"
);
connectionStateSummary
.
Append
(
v
);
};
List
<
Exception
>
innerExceptions
=
new
List
<
Exception
>();
if
(
serverSnapshot
!=
null
)
{
string
serverSnapshotName
;
for
(
int
i
=
0
;
i
<
serverSnapshot
.
Length
;
i
++)
{
serverSnapshotName
=
serverSnapshot
[
i
].
EndPoint
.
ToString
();
add
(
DataServerEndpoint
,
serverSnapshot
[
i
].
EndPoint
.
ToString
());
add
(
DataConnectionState
,
serverSnapshot
[
i
].
ConnectionState
.
ToString
());
if
(
serverSnapshot
[
i
].
LastException
!=
null
&&
serverSnapshot
[
i
].
LastException
is
RedisConnectionException
)
if
(
serverSnapshot
[
i
].
LastException
!=
null
)
{
var
lastException
=
((
RedisConnectionException
)
serverSnapshot
[
i
].
LastException
);
exceptions
.
Add
(
lastException
);
add
(
DataLastFailure
,
lastException
.
FailureType
.
ToString
());
add
(
DataLastInnerException
,
lastException
.
InnerException
?.
Message
);
var
lastException
=
serverSnapshot
[
i
].
LastException
;
innerExceptions
.
Add
(
lastException
);
}
}
}
data
=
exceptions
;
return
connectionStateSummary
.
ToString
();
if
(
innerExceptions
.
Count
==
1
)
{
return
innerExceptions
[
0
];
}
else
if
(
innerExceptions
.
Count
>
1
)
{
return
new
AggregateException
(
innerExceptions
);
}
return
null
;
}
internal
static
Exception
NotSupported
(
bool
includeDetail
,
RedisCommand
command
)
...
...
@@ -158,7 +149,6 @@ private static void AddDetail(Exception exception, Message message, ServerEndPoi
if
(
server
!=
null
)
exception
.
Data
.
Add
(
DataServerKey
,
Format
.
ToString
(
server
.
EndPoint
));
}
}
static
string
GetLabel
(
bool
includeDetail
,
RedisCommand
command
,
Message
message
)
...
...
StackExchange.Redis/StackExchange/Redis/PhysicalBridge.cs
View file @
fa8a5b57
...
...
@@ -70,7 +70,6 @@ public enum State : byte
public
ConnectionType
ConnectionType
{
get
;
}
public
bool
IsConnected
=>
state
==
(
int
)
State
.
ConnectedEstablished
;
public
ConnectionMultiplexer
Multiplexer
{
get
;
}
...
...
@@ -267,7 +266,7 @@ internal void KeepAlive()
Multiplexer
.
Trace
(
"Enqueue: "
+
msg
);
if
(!
TryEnqueue
(
msg
,
ServerEndPoint
.
IsSlave
))
{
OnInternalError
(
ExceptionFactory
.
NoConnectionAvailable
(
Multiplexer
.
IncludeDetailInExceptions
,
msg
.
Command
,
msg
,
ServerEndPoint
,
Multiplexer
.
GetServerSnap
S
hot
()));
OnInternalError
(
ExceptionFactory
.
NoConnectionAvailable
(
Multiplexer
.
IncludeDetailInExceptions
,
msg
.
Command
,
msg
,
ServerEndPoint
,
Multiplexer
.
GetServerSnap
s
hot
()));
}
}
}
...
...
StackExchange.Redis/StackExchange/Redis/RedisBatch.cs
View file @
fa8a5b57
...
...
@@ -30,13 +30,13 @@ public void Execute()
if
(
server
==
null
)
{
FailNoServer
(
snapshot
);
throw
ExceptionFactory
.
NoConnectionAvailable
(
multiplexer
.
IncludeDetailInExceptions
,
message
.
Command
,
message
,
server
,
multiplexer
.
GetServerSnap
S
hot
());
throw
ExceptionFactory
.
NoConnectionAvailable
(
multiplexer
.
IncludeDetailInExceptions
,
message
.
Command
,
message
,
server
,
multiplexer
.
GetServerSnap
s
hot
());
}
var
bridge
=
server
.
GetBridge
(
message
.
Command
);
if
(
bridge
==
null
)
{
FailNoServer
(
snapshot
);
throw
ExceptionFactory
.
NoConnectionAvailable
(
multiplexer
.
IncludeDetailInExceptions
,
message
.
Command
,
message
,
server
,
multiplexer
.
GetServerSnap
S
hot
());
throw
ExceptionFactory
.
NoConnectionAvailable
(
multiplexer
.
IncludeDetailInExceptions
,
message
.
Command
,
message
,
server
,
multiplexer
.
GetServerSnap
s
hot
());
}
// identity a list
...
...
StackExchange.Redis/StackExchange/Redis/RedisServer.cs
View file @
fa8a5b57
...
...
@@ -542,7 +542,7 @@ internal override Task<T> ExecuteAsync<T>(Message message, ResultProcessor<T> pr
// no need to deny exec-sync here; will be complete before they see if
var
tcs
=
TaskSource
.
Create
<
T
>(
asyncState
);
ConnectionMultiplexer
.
ThrowFailed
(
tcs
,
ExceptionFactory
.
NoConnectionAvailable
(
multiplexer
.
IncludeDetailInExceptions
,
message
.
Command
,
message
,
server
,
multiplexer
.
GetServerSnap
S
hot
()));
ConnectionMultiplexer
.
ThrowFailed
(
tcs
,
ExceptionFactory
.
NoConnectionAvailable
(
multiplexer
.
IncludeDetailInExceptions
,
message
.
Command
,
message
,
server
,
multiplexer
.
GetServerSnap
s
hot
()));
return
tcs
.
Task
;
}
return
base
.
ExecuteAsync
<
T
>(
message
,
processor
,
server
);
...
...
@@ -555,7 +555,7 @@ internal override T ExecuteSync<T>(Message message, ResultProcessor<T> processor
if
(!
server
.
IsConnected
)
{
if
(
message
==
null
||
message
.
IsFireAndForget
)
return
default
(
T
);
throw
ExceptionFactory
.
NoConnectionAvailable
(
multiplexer
.
IncludeDetailInExceptions
,
message
.
Command
,
message
,
server
,
multiplexer
.
GetServerSnap
S
hot
());
throw
ExceptionFactory
.
NoConnectionAvailable
(
multiplexer
.
IncludeDetailInExceptions
,
message
.
Command
,
message
,
server
,
multiplexer
.
GetServerSnap
s
hot
());
}
return
base
.
ExecuteSync
<
T
>(
message
,
processor
,
server
);
}
...
...
StackExchange.Redis/StackExchange/Redis/ResultProcessor.cs
View file @
fa8a5b57
...
...
@@ -1165,7 +1165,7 @@ public override bool SetResult(PhysicalConnection connection, Message message, R
{
if
(
result
.
IsEqual
(
authFail
)
||
result
.
IsEqual
(
authRequired
))
{
connection
.
RecordConnectionFailed
(
ConnectionFailureType
.
AuthenticationFailure
);
connection
.
RecordConnectionFailed
(
ConnectionFailureType
.
AuthenticationFailure
,
new
Exception
(
result
.
ToString
()
+
" Verify if the Redis password provided is correct."
)
);
}
else
if
(
result
.
AssertStarts
(
loading
))
{
...
...
StackExchange.Redis/StackExchange/Redis/ServerEndPoint.cs
View file @
fa8a5b57
...
...
@@ -119,9 +119,6 @@ internal PhysicalBridge.State ConnectionState
}
}
public
bool
IsSlave
{
get
{
return
isSlave
;
}
set
{
SetConfig
(
ref
isSlave
,
value
);
}
}
public
long
OperationCount
...
...
@@ -555,7 +552,7 @@ internal Task<T> QueueDirectAsync<T>(Message message, ResultProcessor<T> process
if
(
bridge
==
null
)
bridge
=
GetBridge
(
message
.
Command
);
if
(!
bridge
.
TryEnqueue
(
message
,
isSlave
))
{
ConnectionMultiplexer
.
ThrowFailed
(
tcs
,
ExceptionFactory
.
NoConnectionAvailable
(
multiplexer
.
IncludeDetailInExceptions
,
message
.
Command
,
message
,
this
,
multiplexer
.
GetServerSnap
S
hot
()));
ConnectionMultiplexer
.
ThrowFailed
(
tcs
,
ExceptionFactory
.
NoConnectionAvailable
(
multiplexer
.
IncludeDetailInExceptions
,
message
.
Command
,
message
,
this
,
multiplexer
.
GetServerSnap
s
hot
()));
}
return
tcs
.
Task
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment