Commit f7da2ce1 authored by Marc Gravell's avatar Marc Gravell

Merge branch 'master' into pipelines

# Conflicts:
#	StackExchange.Redis.StrongName/StackExchange.Redis.StrongName.csproj
#	StackExchange.Redis/StackExchange.Redis.csproj
#	StackExchange.Redis/StackExchange/Redis/SocketManager.cs
parents c83bb17e 64a4a523
...@@ -142,8 +142,8 @@ public async Task DeslaveGoesToPrimary() ...@@ -142,8 +142,8 @@ public async Task DeslaveGoesToPrimary()
Writer.WriteLine("Connecting to secondary validation connection."); Writer.WriteLine("Connecting to secondary validation connection.");
using (var conn2 = ConnectionMultiplexer.Connect(config)) using (var conn2 = ConnectionMultiplexer.Connect(config))
{ {
var primary2 = conn.GetServer(TestConfig.Current.FailoverMasterServerAndPort); var primary2 = conn2.GetServer(TestConfig.Current.FailoverMasterServerAndPort);
var secondary2 = conn.GetServer(TestConfig.Current.FailoverSlaveServerAndPort); var secondary2 = conn2.GetServer(TestConfig.Current.FailoverSlaveServerAndPort);
Writer.WriteLine($"Check: {primary2.EndPoint}: {primary2.ServerType}, Mode: {(primary2.IsSlave ? "Slave" : "Master")}"); Writer.WriteLine($"Check: {primary2.EndPoint}: {primary2.ServerType}, Mode: {(primary2.IsSlave ? "Slave" : "Master")}");
Writer.WriteLine($"Check: {secondary2.EndPoint}: {secondary2.ServerType}, Mode: {(secondary2.IsSlave ? "Slave" : "Master")}"); Writer.WriteLine($"Check: {secondary2.EndPoint}: {secondary2.ServerType}, Mode: {(secondary2.IsSlave ? "Slave" : "Master")}");
...@@ -151,7 +151,7 @@ public async Task DeslaveGoesToPrimary() ...@@ -151,7 +151,7 @@ public async Task DeslaveGoesToPrimary()
Assert.False(primary2.IsSlave, $"{primary2.EndPoint} should be a master (verification connection)."); Assert.False(primary2.IsSlave, $"{primary2.EndPoint} should be a master (verification connection).");
Assert.True(secondary2.IsSlave, $"{secondary2.EndPoint} should be a slave (verification connection)."); Assert.True(secondary2.IsSlave, $"{secondary2.EndPoint} should be a slave (verification connection).");
var db2 = conn.GetDatabase(); var db2 = conn2.GetDatabase();
Assert.Equal(primary2.EndPoint, db2.IdentifyEndpoint(key, CommandFlags.PreferMaster)); Assert.Equal(primary2.EndPoint, db2.IdentifyEndpoint(key, CommandFlags.PreferMaster));
Assert.Equal(primary2.EndPoint, db2.IdentifyEndpoint(key, CommandFlags.DemandMaster)); Assert.Equal(primary2.EndPoint, db2.IdentifyEndpoint(key, CommandFlags.DemandMaster));
......
...@@ -183,9 +183,9 @@ void proxyCallback(IAsyncResult ar) ...@@ -183,9 +183,9 @@ void proxyCallback(IAsyncResult ar)
var addressFamily = endpoint.AddressFamily == AddressFamily.Unspecified ? AddressFamily.InterNetwork : endpoint.AddressFamily; var addressFamily = endpoint.AddressFamily == AddressFamily.Unspecified ? AddressFamily.InterNetwork : endpoint.AddressFamily;
var socket = new Socket(addressFamily, SocketType.Stream, ProtocolType.Tcp); var protocolType = addressFamily == AddressFamily.Unix ? ProtocolType.Unspecified : ProtocolType.Tcp;
var socket = new Socket(addressFamily, SocketType.Stream, protocolType);
if (addressFamily != AddressFamily.Unix) SocketConnection.SetRecommendedClientOptions(socket); SocketConnection.SetRecommendedClientOptions(socket);
try try
{ {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<ProjectReference Include="..\..\Pipelines.Sockets.Unofficial\src\Pipelines.Sockets.Unofficial\Pipelines.Sockets.Unofficial.csproj" /> <ProjectReference Include="..\..\Pipelines.Sockets.Unofficial\src\Pipelines.Sockets.Unofficial\Pipelines.Sockets.Unofficial.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(Computername)'!='OCHO'"> <ItemGroup Condition="'$(Computername)'!='OCHO'">
<PackageReference Include="Pipelines.Sockets.Unofficial" Version="0.2.1-alpha.45" /> <PackageReference Include="Pipelines.Sockets.Unofficial" Version="0.2.1-alpha.48" />
</ItemGroup> </ItemGroup>
</Project> </Project>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment