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
ee12f613
Commit
ee12f613
authored
May 30, 2018
by
Nick Craver
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'craver/mono-support'
parents
fbc5d33c
e6d810c4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
14 deletions
+19
-14
ConnectionMultiplexer.cs
...change.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
+1
-7
PhysicalConnection.cs
...kExchange.Redis/StackExchange/Redis/PhysicalConnection.cs
+2
-5
PlatformHelper.cs
StackExchange.Redis/StackExchange/Redis/PlatformHelper.cs
+14
-0
SocketManager.Poll.cs
...kExchange.Redis/StackExchange/Redis/SocketManager.Poll.cs
+2
-2
No files found.
StackExchange.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
View file @
ee12f613
...
...
@@ -194,13 +194,7 @@ internal void OnErrorMessage(EndPoint endpoint, string message)
[
System
.
Diagnostics
.
CodeAnalysis
.
SuppressMessage
(
"Microsoft.Usage"
,
"CA2202:Do not dispose objects multiple times"
)]
private
static
void
Write
<
T
>(
ZipArchive
zip
,
string
name
,
Task
task
,
Action
<
T
,
StreamWriter
>
callback
)
{
var
entry
=
zip
.
CreateEntry
(
name
,
#if __MonoCS__
CompressionLevel
.
Fastest
#else
CompressionLevel
.
Optimal
#endif
);
var
entry
=
zip
.
CreateEntry
(
name
,
CompressionLevel
.
Optimal
);
using
(
var
stream
=
entry
.
Open
())
using
(
var
writer
=
new
StreamWriter
(
stream
))
{
...
...
StackExchange.Redis/StackExchange/Redis/PhysicalConnection.cs
View file @
ee12f613
...
...
@@ -740,11 +740,8 @@ SocketMode ISocketCallback.Connected(Stream stream, TextWriter log)
if
(
string
.
IsNullOrWhiteSpace
(
host
))
host
=
Format
.
ToStringHostOnly
(
Bridge
.
ServerEndPoint
.
EndPoint
);
var
ssl
=
new
SslStream
(
stream
,
false
,
config
.
CertificateValidationCallback
,
config
.
CertificateSelectionCallback
??
GetAmbientCertificateCallback
()
#if !__MonoCS__
,
EncryptionPolicy
.
RequireEncryption
#endif
);
config
.
CertificateSelectionCallback
??
GetAmbientCertificateCallback
(),
EncryptionPolicy
.
RequireEncryption
);
try
{
ssl
.
AuthenticateAsClient
(
host
,
config
.
SslProtocols
);
...
...
StackExchange.Redis/StackExchange/Redis/PlatformHelper.cs
0 → 100644
View file @
ee12f613
using
System
;
namespace
StackExchange.Redis
{
internal
class
PlatformHelper
{
public
static
bool
IsMono
{
get
;
}
=
Type
.
GetType
(
"Mono.Runtime"
)
!=
null
;
public
static
bool
IsUnix
{
get
;
}
=
(
int
)
Environment
.
OSVersion
.
Platform
==
4
||
(
int
)
Environment
.
OSVersion
.
Platform
==
6
||
(
int
)
Environment
.
OSVersion
.
Platform
==
128
;
public
static
SocketMode
DefaultSocketMode
=
IsMono
&&
IsUnix
?
SocketMode
.
Async
:
SocketMode
.
Poll
;
}
}
StackExchange.Redis/StackExchange/Redis/SocketManager.Poll.cs
View file @
ee12f613
...
...
@@ -10,7 +10,7 @@ namespace StackExchange.Redis
{
public
partial
class
SocketManager
{
internal
const
SocketMode
DefaultSocketMode
=
SocketMode
.
Poll
;
internal
static
SocketMode
DefaultSocketMode
=
PlatformHelper
.
DefaultSocketMode
;
private
static
readonly
IntPtr
[]
EmptyPointers
=
new
IntPtr
[
0
];
private
static
readonly
WaitCallback
HelpProcessItems
=
state
=>
{
...
...
@@ -429,4 +429,4 @@ internal void Pulse()
}
}
}
#
endif
\ No newline at end of file
#endif
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