Skip to content

Commit 561edc7

Browse files
author
ladeak
committed
Addressing some warnings
1 parent 97b74e8 commit 561edc7

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/CHttpServer/CHttpServer/DuplexPipeStreamAdapter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace CHttpServer;
77
internal class DuplexPipeStreamAdapter<TStream> : Stream, IDuplexPipe where TStream : Stream
88
{
99
private bool _disposed;
10-
private readonly object _disposeLock = new object();
10+
private readonly Lock _disposeLock = new();
1111

1212
public DuplexPipeStreamAdapter(TStream stream, StreamPipeReaderOptions readerOptions, StreamPipeWriterOptions writerOptions)
1313
{

src/CHttpServer/CHttpServer/Http3/Http3FramingStreamWriter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public override async ValueTask<FlushResult> WriteAsync(ReadOnlyMemory<byte> sou
154154
_responseStream.Flush();
155155
return new FlushResult(isCanceled: false, isCompleted: false);
156156
}
157-
catch (Exception ex)
157+
catch (Exception)
158158
{
159159
_isCompleted = true;
160160
ClearSegments(CollectionsMarshal.AsSpan(_segments));

src/CHttpServer/CHttpServer/HttpsConnectionMiddleware.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public async Task OnConnectionAsync(CHttp2ConnectionContext context)
5454
}
5555

5656
var sslDuplexPipe = CreateSslDuplexPipe(
57-
context.Transport,
57+
context.Transport!,
5858
context.Features.Get<IMemoryPoolFeature>()?.MemoryPool ?? MemoryPool<byte>.Shared);
5959
var sslStream = sslDuplexPipe.Stream;
6060

src/CHttpServer/TestCHttpServerApplication/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858

5959
public class Data
6060
{
61-
public string Message { get; set; }
61+
public required string Message { get; set; }
6262
}
6363

6464
[JsonSerializable(typeof(Data))]

0 commit comments

Comments
 (0)