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