jchristn/WatsonWebsocket

Incorrect #if condition in SetInvalidCertificateAcceptance

Closed this issue · 2 comments

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

Thank you @Rubidium37 - I will make the change!