Commit d9d78f8b authored by Marc Gravell's avatar Marc Gravell

dispose pipe with physical connection; update lib; use dedicated db for FlushFetchRandomKey()

parent 6c7e575b
......@@ -29,11 +29,11 @@ public void TestScan()
}
[Fact]
public void RandomKey()
public void FlushFetchRandomKey()
{
using (var conn = Create(allowAdmin: true))
{
var db = conn.GetDatabase();
var db = conn.GetDatabase(7);
conn.GetServer(TestConfig.Current.MasterServerAndPort).FlushDatabase();
string anyKey = db.KeyRandom();
......
......@@ -24,6 +24,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Pipelines.Sockets.Unofficial" Version="0.2.1-alpha.51" />
<PackageReference Include="Pipelines.Sockets.Unofficial" Version="0.2.1-alpha.52" />
</ItemGroup>
</Project>
\ No newline at end of file
......@@ -1564,6 +1564,7 @@ private async Task<ServerEndPoint> NominatePreferredMaster(TextWriter log, Serve
if (useTieBreakers)
{ // count the votes
uniques = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase);
LogLocked(log, "Waiting for tiebreakers...");
await WaitAllIgnoreErrorsAsync(tieBreakers, 50, log).ForAwait();
for (int i = 0; i < tieBreakers.Length; i++)
{
......
......@@ -127,6 +127,7 @@ public void Dispose()
try { ioPipe.Output?.Complete(); } catch { }
ioPipe.Output?.Complete();
}
try { using (ioPipe as IDisposable) { } } catch { }
if (socketToken.HasValue)
{
......
......@@ -14,7 +14,7 @@
<ProjectReference Include="..\StackExchange.Redis\StackExchange.Redis.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Pipelines.Sockets.Unofficial" Version="0.2.1-alpha.51" />
<PackageReference Include="Pipelines.Sockets.Unofficial" Version="0.2.1-alpha.52" />
</ItemGroup>
</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