File tree 1 file changed +14
-10
lines changed
src/Enyim.Caching/Memcached
1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -118,19 +118,21 @@ void Cancel()
118
118
119
119
if ( success )
120
120
{
121
- #if NET5_0_OR_GREATER
122
121
if ( _useSslStream )
123
122
{
124
123
_sslStream = new SslStream ( new NetworkStream ( _socket ) ) ;
125
- _sslStream . AuthenticateAsClient ( _sslClientAuthOptions ) ;
124
+ _sslStream . AuthenticateAsClient (
125
+ #if NET5_0_OR_GREATER
126
+ _sslClientAuthOptions
127
+ #else
128
+ ( ( DnsEndPoint ) _endpoint ) . Host
129
+ #endif
130
+ ) ;
126
131
}
127
132
else
128
133
{
129
134
_inputStream = new NetworkStream ( _socket ) ;
130
135
}
131
- #else
132
- _inputStream = new NetworkStream ( _socket ) ;
133
- #endif
134
136
}
135
137
else
136
138
{
@@ -182,19 +184,21 @@ public async Task ConnectAsync()
182
184
183
185
if ( success )
184
186
{
185
- #if NET5_0_OR_GREATER
186
187
if ( _useSslStream )
187
188
{
188
189
_sslStream = new SslStream ( new NetworkStream ( _socket ) ) ;
189
- await _sslStream . AuthenticateAsClientAsync ( _sslClientAuthOptions ) ;
190
+ await _sslStream . AuthenticateAsClientAsync (
191
+ #if NET5_0_OR_GREATER
192
+ _sslClientAuthOptions
193
+ #else
194
+ ( ( DnsEndPoint ) _endpoint ) . Host
195
+ #endif
196
+ ) ;
190
197
}
191
198
else
192
199
{
193
200
_inputStream = new NetworkStream ( _socket ) ;
194
201
}
195
- #else
196
- _inputStream = new NetworkStream ( _socket ) ;
197
- #endif
198
202
}
199
203
else
200
204
{
You can’t perform that action at this time.
0 commit comments