jchristn / WatsonWebsocket

A simple C# async websocket server and client for reliable transmission and receipt of data
MIT License
277 stars 53 forks source link

Incorrect #if condition in SetInvalidCertificateAcceptance #127

Closed Rubidium37 closed 1 year ago

Rubidium37 commented 1 year ago

in WatsonWsClient.cs, in the method SetInvalidCertificateAcceptance (currently around line 600), there is a conditional compilation directive.

The directive tests for NET, NETSTANDARD and NETCOREAPP. The wrapped code has a reference to the property ClientWebSocketOptions.RemoteCertificateValidationCallback.

Such property is available in NET standard starting from version 2.1.

Therefore, the preprocessor condition should be changed from #if NET || NETSTANDARD || NETCOREAPP to #if NET || NETSTANDARD2_1_OR_GREATER || NETCOREAPP

jchristn commented 1 year ago

Thank you @Rubidium37 - I will make the change!

jchristn commented 1 year ago

NuGet: https://www.nuget.org/packages/WatsonWebsocket/4.0.9 Commit: https://github.com/jchristn/WatsonWebsocket/commit/d16149e57f6939b56ff87102141d4f25a6718711