Useless ping pong in recovery removed
This commit is contained in:
@@ -4,5 +4,10 @@ namespace mROA.Implementation.Attributes
|
||||
{
|
||||
public class UntrustedAttribute : Attribute
|
||||
{
|
||||
public bool UseAwait { get; private set; }
|
||||
public UntrustedAttribute(bool useAwait = true)
|
||||
{
|
||||
UseAwait = useAwait;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,10 +28,10 @@ namespace mROA.Implementation
|
||||
SingleWriter = false,
|
||||
});
|
||||
_receiveReader = ReceiveChanel.Reader;
|
||||
_outputTrustedChannel = Channel.CreateBounded<NetworkMessageHeader>(new BoundedChannelOptions(1)
|
||||
_outputTrustedChannel = Channel.CreateUnbounded<NetworkMessageHeader>(new UnboundedChannelOptions
|
||||
{
|
||||
SingleReader = true,
|
||||
SingleWriter = true,
|
||||
SingleWriter = true
|
||||
});
|
||||
_trustedWriter = _outputTrustedChannel.Writer;
|
||||
_outputUntrustedChannel = Channel.CreateUnbounded<NetworkMessageHeader>(new UnboundedChannelOptions
|
||||
@@ -121,13 +121,9 @@ namespace mROA.Implementation
|
||||
{
|
||||
await PostMessageAsync(
|
||||
new NetworkMessageHeader(_serialization!, new ClientRecovery(Math.Abs(ConnectionId)), _context));
|
||||
await ReceiveChanel.Reader.ReadAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
await _trustedWriter.WriteAsync(new NetworkMessageHeader());
|
||||
}
|
||||
|
||||
|
||||
_reconnection.TrySetResult(Stream.Null);
|
||||
_isConnected = true;
|
||||
_reconnection = new TaskCompletionSource<Stream>();
|
||||
|
||||
+3
-3
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Title>mROA</Title>
|
||||
<Version>2.0.1</Version>
|
||||
<Version>2.0.2</Version>
|
||||
<Authors>YaslePoy</Authors>
|
||||
<Description>Fast and easy RPC with contex</Description>
|
||||
<RepositoryUrl>https://github.com/YaslePoy/mROA</RepositoryUrl>
|
||||
@@ -25,8 +25,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Text.Json" Version="9.0.2"/>
|
||||
<PackageReference Include="System.Threading.Channels" Version="9.0.4" />
|
||||
<PackageReference Include="System.Text.Json" Version="9.0.5" />
|
||||
<PackageReference Include="System.Threading.Channels" Version="9.0.5" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user