Skip to content

Commit

Permalink
Fix Windows error
Browse files Browse the repository at this point in the history
  • Loading branch information
ManickaP committed Jul 5, 2022
1 parent 607df72 commit 035a47a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ private unsafe int HandleListenerEvent(ref QUIC_LISTENER_EVENT listenerEvent)
}

QuicConnection connection = new QuicConnection(new MsQuicConnection(data.Connection, data.Info));
SslClientHelloInfo clientHello = new SslClientHelloInfo(Marshal.PtrToStringUTF8((IntPtr)data.Info->ServerName, data.Info->ServerNameLength), SslProtocols.Tls13);
SslClientHelloInfo clientHello = new SslClientHelloInfo(data.Info->ServerNameLength > 0 ? Marshal.PtrToStringUTF8((IntPtr)data.Info->ServerName, data.Info->ServerNameLength) : "", SslProtocols.Tls13);

// Kicks off the rest of the handshake in the background.
pendingConnection.StartHandshake(connection, clientHello, _connectionOptionsCallback);
Expand Down

0 comments on commit 035a47a

Please sign in to comment.