[perf_witness] Ignore socket deletion errors on shutdown
Users report sporadic failure on Windows ARM64 but I am unable to reproduce this locally. Fixes https://github.com/dart-lang/sdk/issues/63343 TEST=Unable to reproduce the underlying issue Change-Id: I78c0be78f5e70755b69fec50a896aaef6a6a6964 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502060 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Slava Egorov <vegorov@google.com>
This commit is contained in:
committed by
dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent
b511694fab
commit
1707f11db4
@@ -251,7 +251,13 @@ class PerfWitnessServer {
|
||||
}
|
||||
await _server?.close();
|
||||
if (io.FileSystemEntity.typeSync(_controlSocketPath) != .notFound) {
|
||||
io.File(_controlSocketPath).deleteSync();
|
||||
try {
|
||||
// Normally we would not expect this to throw, but on Windows
|
||||
// users reported an occasional ERROR_CANT_ACCESS_FILE thrown here,
|
||||
// possibly due to some sort of NTFS race with deleting the reparse
|
||||
// point after unix domain socket was closed. See dartbug.com/63343.
|
||||
io.File(_controlSocketPath).deleteSync();
|
||||
} catch (_) {}
|
||||
}
|
||||
calloc.free(_isRecordingTimelineWithAsyncSpans);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user