Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Abort()

override void System.Net.FtpWebRequest.Abort ( )
inlinevirtual

Reimplemented from System.Net.WebRequest.

Definition at line 1319 of file FtpWebRequest.cs.

1320 {
1321 if (_aborted)
1322 {
1323 return;
1324 }
1325 try
1326 {
1327 Stream stream;
1328 FtpControlStream connection;
1329 lock (_syncObject)
1330 {
1331 if (_requestStage >= RequestStage.ReleaseConnection)
1332 {
1333 return;
1334 }
1335 _aborted = true;
1336 stream = _stream;
1337 connection = _connection;
1338 _exception = ExceptionHelper.RequestAbortedException;
1339 }
1340 if (stream != null)
1341 {
1342 ((ICloseEx)stream).CloseEx(CloseExState.Abort | CloseExState.Silent);
1343 }
1344 connection?.Abort(ExceptionHelper.RequestAbortedException);
1345 }
1346 catch (Exception message)
1347 {
1348 if (System.Net.NetEventSource.Log.IsEnabled())
1349 {
1350 System.Net.NetEventSource.Error(this, message, "Abort");
1351 }
1352 throw;
1353 }
1354 }
FtpControlStream _connection
static readonly System.Net.NetEventSource Log
static void Error(object thisOrContextObject, FormattableString formattableString, [CallerMemberName] string memberName=null)

References System.Net.CommandStream.Abort(), System.Net.NetEventSource.Error(), System.Net.NetEventSource.Log, System.Net.ExceptionHelper.RequestAbortedException, and System.stream.