@@ -121,27 +121,20 @@ internal async ValueTask<Http3ControlStream> GetInboundControlStream()
121
121
{
122
122
if ( _inboundControlStream == null )
123
123
{
124
- return await CreateNewInboundControlStream ( ) ;
125
- }
126
-
127
- return null ;
128
- }
129
-
130
- internal async ValueTask < Http3ControlStream > CreateNewInboundControlStream ( )
131
- {
132
- var reader = MultiplexedConnectionContext . ToClientAcceptQueue . Reader ;
133
- while ( await reader . WaitToReadAsync ( ) )
134
- {
135
- while ( reader . TryRead ( out var stream ) )
124
+ var reader = MultiplexedConnectionContext . ToClientAcceptQueue . Reader ;
125
+ while ( await reader . WaitToReadAsync ( ) )
136
126
{
137
- _inboundControlStream = stream ;
138
- var streamId = await stream . TryReadStreamIdAsync ( ) ;
139
- Debug . Assert ( streamId == 0 , "StreamId sent that was non-zero, which isn't handled by tests" ) ;
140
- return _inboundControlStream ;
127
+ while ( reader . TryRead ( out var stream ) )
128
+ {
129
+ _inboundControlStream = stream ;
130
+ var streamId = await stream . TryReadStreamIdAsync ( ) ;
131
+ Debug . Assert ( streamId == 0 , "StreamId sent that was non-zero, which isn't handled by tests" ) ;
132
+ return _inboundControlStream ;
133
+ }
141
134
}
142
135
}
143
136
144
- throw new InvalidOperationException ( "Should never reach here." ) ;
137
+ return null ;
145
138
}
146
139
147
140
internal async Task WaitForConnectionErrorAsync < TException > ( bool ignoreNonGoAwayFrames , long expectedLastStreamId , Http3ErrorCode expectedErrorCode , params string [ ] expectedErrorMessage )
@@ -464,21 +457,12 @@ internal async Task WaitForStreamErrorAsync(Http3ErrorCode protocolError, string
464
457
_testBase . Logger . LogTrace ( "Input is completed" ) ;
465
458
466
459
Assert . True ( readResult . IsCompleted ) ;
467
- //try
468
- {
469
- Assert . Equal ( protocolError , ( Http3ErrorCode ) Error ) ;
460
+ Assert . Equal ( protocolError , ( Http3ErrorCode ) Error ) ;
470
461
471
- if ( expectedErrorMessage != null )
472
- {
473
- Assert . Contains ( _testBase . LogMessages , m => m . Exception ? . Message . Contains ( expectedErrorMessage ) ?? false ) ;
474
- }
462
+ if ( expectedErrorMessage != null )
463
+ {
464
+ Assert . Contains ( _testBase . LogMessages , m => m . Exception ? . Message . Contains ( expectedErrorMessage ) ?? false ) ;
475
465
}
476
- //catch (Exception ex)
477
- //{
478
- // Debugger.Launch();
479
- // string s = ex.Message;
480
- // throw;
481
- //}
482
466
}
483
467
}
484
468
0 commit comments