Since commit 07b56bf1f7338274ae27208094cccc2aa8aa7519 fixing #396, relaunching the application as an administrator from the in-app prompt can crash with System.IO.IOException: All pipe instances are busy.
I tried a hacky workaround of constructing the named pipe server with maxNumberOfServerInstances = 2 and that prevents the crash, but I figure the named pipe should probably be cleaned up before the application-wide mutex is released (and before the subprocess starts), instead, to prevent unexpectedly sharing it for a brief moment before shutdown.
Since commit 07b56bf1f7338274ae27208094cccc2aa8aa7519 fixing #396, relaunching the application as an administrator from the in-app prompt can crash with
System.IO.IOException: All pipe instances are busy.
This happens because the construction of the
NamedPipeServerStream
inApplication.xaml.vb
is implicitly unique, so the new process will error out if it attempts to create its own before the old process closes its original one.I tried a hacky workaround of constructing the named pipe server with
maxNumberOfServerInstances = 2
and that prevents the crash, but I figure the named pipe should probably be cleaned up before the application-wide mutex is released (and before the subprocess starts), instead, to prevent unexpectedly sharing it for a brief moment before shutdown.