@@ -492,12 +492,12 @@ public byte[] RequestOpen(string path, Flags flags, bool nullOnError = false)
492
492
response =>
493
493
{
494
494
handle = response . Handle ;
495
- _ = wait . Set ( ) ;
495
+ wait . SetIgnoringObjectDisposed ( ) ;
496
496
} ,
497
497
response =>
498
498
{
499
499
exception = GetSftpException ( response ) ;
500
- _ = wait . Set ( ) ;
500
+ wait . SetIgnoringObjectDisposed ( ) ;
501
501
} ) ;
502
502
503
503
SendRequest ( request ) ;
@@ -625,7 +625,7 @@ public void RequestClose(byte[] handle)
625
625
response =>
626
626
{
627
627
exception = GetSftpException ( response ) ;
628
- _ = wait . Set ( ) ;
628
+ wait . SetIgnoringObjectDisposed ( ) ;
629
629
} ) ;
630
630
631
631
SendRequest ( request ) ;
@@ -825,7 +825,7 @@ public byte[] RequestRead(byte[] handle, ulong offset, uint length)
825
825
response =>
826
826
{
827
827
data = response . Data ;
828
- _ = wait . Set ( ) ;
828
+ wait . SetIgnoringObjectDisposed ( ) ;
829
829
} ,
830
830
response =>
831
831
{
@@ -838,7 +838,7 @@ public byte[] RequestRead(byte[] handle, ulong offset, uint length)
838
838
data = Array . Empty < byte > ( ) ;
839
839
}
840
840
841
- _ = wait . Set ( ) ;
841
+ wait . SetIgnoringObjectDisposed ( ) ;
842
842
} ) ;
843
843
844
844
SendRequest ( request ) ;
@@ -928,10 +928,7 @@ public void RequestWrite(byte[] handle,
928
928
writeCompleted ? . Invoke ( response ) ;
929
929
930
930
exception = GetSftpException ( response ) ;
931
- if ( wait != null )
932
- {
933
- _ = wait . Set ( ) ;
934
- }
931
+ wait ? . SetIgnoringObjectDisposed ( ) ;
935
932
} ) ;
936
933
937
934
SendRequest ( request ) ;
@@ -1011,12 +1008,12 @@ public SftpFileAttributes RequestLStat(string path)
1011
1008
response =>
1012
1009
{
1013
1010
attributes = response . Attributes ;
1014
- _ = wait . Set ( ) ;
1011
+ wait . SetIgnoringObjectDisposed ( ) ;
1015
1012
} ,
1016
1013
response =>
1017
1014
{
1018
1015
exception = GetSftpException ( response ) ;
1019
- _ = wait . Set ( ) ;
1016
+ wait . SetIgnoringObjectDisposed ( ) ;
1020
1017
} ) ;
1021
1018
1022
1019
SendRequest ( request ) ;
@@ -1140,12 +1137,12 @@ public SftpFileAttributes RequestFStat(byte[] handle, bool nullOnError)
1140
1137
response =>
1141
1138
{
1142
1139
attributes = response . Attributes ;
1143
- _ = wait . Set ( ) ;
1140
+ wait . SetIgnoringObjectDisposed ( ) ;
1144
1141
} ,
1145
1142
response =>
1146
1143
{
1147
1144
exception = GetSftpException ( response ) ;
1148
- _ = wait . Set ( ) ;
1145
+ wait . SetIgnoringObjectDisposed ( ) ;
1149
1146
} ) ;
1150
1147
1151
1148
SendRequest ( request ) ;
@@ -1207,7 +1204,7 @@ public void RequestSetStat(string path, SftpFileAttributes attributes)
1207
1204
response =>
1208
1205
{
1209
1206
exception = GetSftpException ( response ) ;
1210
- _ = wait . Set ( ) ;
1207
+ wait . SetIgnoringObjectDisposed ( ) ;
1211
1208
} ) ;
1212
1209
1213
1210
SendRequest ( request ) ;
@@ -1239,7 +1236,7 @@ public void RequestFSetStat(byte[] handle, SftpFileAttributes attributes)
1239
1236
response =>
1240
1237
{
1241
1238
exception = GetSftpException ( response ) ;
1242
- _ = wait . Set ( ) ;
1239
+ wait . SetIgnoringObjectDisposed ( ) ;
1243
1240
} ) ;
1244
1241
1245
1242
SendRequest ( request ) ;
@@ -1274,12 +1271,12 @@ public byte[] RequestOpenDir(string path, bool nullOnError = false)
1274
1271
response =>
1275
1272
{
1276
1273
handle = response . Handle ;
1277
- _ = wait . Set ( ) ;
1274
+ wait . SetIgnoringObjectDisposed ( ) ;
1278
1275
} ,
1279
1276
response =>
1280
1277
{
1281
1278
exception = GetSftpException ( response ) ;
1282
- _ = wait . Set ( ) ;
1279
+ wait . SetIgnoringObjectDisposed ( ) ;
1283
1280
} ) ;
1284
1281
1285
1282
SendRequest ( request ) ;
@@ -1345,7 +1342,7 @@ public KeyValuePair<string, SftpFileAttributes>[] RequestReadDir(byte[] handle)
1345
1342
response =>
1346
1343
{
1347
1344
result = response . Files ;
1348
- _ = wait . Set ( ) ;
1345
+ wait . SetIgnoringObjectDisposed ( ) ;
1349
1346
} ,
1350
1347
response =>
1351
1348
{
@@ -1354,7 +1351,7 @@ public KeyValuePair<string, SftpFileAttributes>[] RequestReadDir(byte[] handle)
1354
1351
exception = GetSftpException ( response ) ;
1355
1352
}
1356
1353
1357
- _ = wait . Set ( ) ;
1354
+ wait . SetIgnoringObjectDisposed ( ) ;
1358
1355
} ) ;
1359
1356
1360
1357
SendRequest ( request ) ;
@@ -1426,7 +1423,7 @@ public void RequestRemove(string path)
1426
1423
response =>
1427
1424
{
1428
1425
exception = GetSftpException ( response ) ;
1429
- _ = wait . Set ( ) ;
1426
+ wait . SetIgnoringObjectDisposed ( ) ;
1430
1427
} ) ;
1431
1428
1432
1429
SendRequest ( request ) ;
@@ -1493,7 +1490,7 @@ public void RequestMkDir(string path)
1493
1490
response =>
1494
1491
{
1495
1492
exception = GetSftpException ( response ) ;
1496
- _ = wait . Set ( ) ;
1493
+ wait . SetIgnoringObjectDisposed ( ) ;
1497
1494
} ) ;
1498
1495
1499
1496
SendRequest ( request ) ;
@@ -1558,7 +1555,7 @@ public void RequestRmDir(string path)
1558
1555
response =>
1559
1556
{
1560
1557
exception = GetSftpException ( response ) ;
1561
- _ = wait . Set ( ) ;
1558
+ wait . SetIgnoringObjectDisposed ( ) ;
1562
1559
} ) ;
1563
1560
1564
1561
SendRequest ( request ) ;
@@ -1625,12 +1622,12 @@ internal KeyValuePair<string, SftpFileAttributes>[] RequestRealPath(string path,
1625
1622
response =>
1626
1623
{
1627
1624
result = response . Files ;
1628
- _ = wait . Set ( ) ;
1625
+ wait . SetIgnoringObjectDisposed ( ) ;
1629
1626
} ,
1630
1627
response =>
1631
1628
{
1632
1629
exception = GetSftpException ( response ) ;
1633
- _ = wait . Set ( ) ;
1630
+ wait . SetIgnoringObjectDisposed ( ) ;
1634
1631
} ) ;
1635
1632
1636
1633
SendRequest ( request ) ;
@@ -1751,12 +1748,12 @@ public SftpFileAttributes RequestStat(string path, bool nullOnError = false)
1751
1748
response =>
1752
1749
{
1753
1750
attributes = response . Attributes ;
1754
- _ = wait . Set ( ) ;
1751
+ wait . SetIgnoringObjectDisposed ( ) ;
1755
1752
} ,
1756
1753
response =>
1757
1754
{
1758
1755
exception = GetSftpException ( response ) ;
1759
- _ = wait . Set ( ) ;
1756
+ wait . SetIgnoringObjectDisposed ( ) ;
1760
1757
} ) ;
1761
1758
1762
1759
SendRequest ( request ) ;
@@ -1849,7 +1846,7 @@ public void RequestRename(string oldPath, string newPath)
1849
1846
response =>
1850
1847
{
1851
1848
exception = GetSftpException ( response ) ;
1852
- _ = wait . Set ( ) ;
1849
+ wait . SetIgnoringObjectDisposed ( ) ;
1853
1850
} ) ;
1854
1851
1855
1852
SendRequest ( request ) ;
@@ -1930,12 +1927,12 @@ internal KeyValuePair<string, SftpFileAttributes>[] RequestReadLink(string path,
1930
1927
response =>
1931
1928
{
1932
1929
result = response . Files ;
1933
- _ = wait . Set ( ) ;
1930
+ wait . SetIgnoringObjectDisposed ( ) ;
1934
1931
} ,
1935
1932
response =>
1936
1933
{
1937
1934
exception = GetSftpException ( response ) ;
1938
- _ = wait . Set ( ) ;
1935
+ wait . SetIgnoringObjectDisposed ( ) ;
1939
1936
} ) ;
1940
1937
1941
1938
SendRequest ( request ) ;
@@ -1975,7 +1972,7 @@ public void RequestSymLink(string linkpath, string targetpath)
1975
1972
response =>
1976
1973
{
1977
1974
exception = GetSftpException ( response ) ;
1978
- _ = wait . Set ( ) ;
1975
+ wait . SetIgnoringObjectDisposed ( ) ;
1979
1976
} ) ;
1980
1977
1981
1978
SendRequest ( request ) ;
@@ -2013,7 +2010,7 @@ public void RequestPosixRename(string oldPath, string newPath)
2013
2010
response =>
2014
2011
{
2015
2012
exception = GetSftpException ( response ) ;
2016
- _ = wait . Set ( ) ;
2013
+ wait . SetIgnoringObjectDisposed ( ) ;
2017
2014
} ) ;
2018
2015
2019
2016
if ( ! _supportedExtensions . ContainsKey ( request . Name ) )
@@ -2060,12 +2057,12 @@ public SftpFileSystemInformation RequestStatVfs(string path, bool nullOnError =
2060
2057
response =>
2061
2058
{
2062
2059
information = response . GetReply < StatVfsReplyInfo > ( ) . Information ;
2063
- _ = wait . Set ( ) ;
2060
+ wait . SetIgnoringObjectDisposed ( ) ;
2064
2061
} ,
2065
2062
response =>
2066
2063
{
2067
2064
exception = GetSftpException ( response ) ;
2068
- _ = wait . Set ( ) ;
2065
+ wait . SetIgnoringObjectDisposed ( ) ;
2069
2066
} ) ;
2070
2067
2071
2068
if ( ! _supportedExtensions . ContainsKey ( request . Name ) )
@@ -2148,12 +2145,12 @@ internal SftpFileSystemInformation RequestFStatVfs(byte[] handle, bool nullOnErr
2148
2145
response =>
2149
2146
{
2150
2147
information = response . GetReply < StatVfsReplyInfo > ( ) . Information ;
2151
- _ = wait . Set ( ) ;
2148
+ wait . SetIgnoringObjectDisposed ( ) ;
2152
2149
} ,
2153
2150
response =>
2154
2151
{
2155
2152
exception = GetSftpException ( response ) ;
2156
- _ = wait . Set ( ) ;
2153
+ wait . SetIgnoringObjectDisposed ( ) ;
2157
2154
} ) ;
2158
2155
2159
2156
if ( ! _supportedExtensions . ContainsKey ( request . Name ) )
@@ -2197,7 +2194,7 @@ internal void HardLink(string oldPath, string newPath)
2197
2194
response =>
2198
2195
{
2199
2196
exception = GetSftpException ( response ) ;
2200
- _ = wait . Set ( ) ;
2197
+ wait . SetIgnoringObjectDisposed ( ) ;
2201
2198
} ) ;
2202
2199
2203
2200
if ( ! _supportedExtensions . ContainsKey ( request . Name ) )
0 commit comments