fixes crashes
This commit is contained in:
@@ -413,6 +413,7 @@ namespace v2rayN.Forms
|
|||||||
{
|
{
|
||||||
autoLatencyRefreshTask = Task.Run(async delegate
|
autoLatencyRefreshTask = Task.Run(async delegate
|
||||||
{
|
{
|
||||||
|
if (!this.IsHandleCreated) return; // the GUI app is exiting.
|
||||||
await Task.Delay(2000);
|
await Task.Delay(2000);
|
||||||
this.Invoke((MethodInvoker)(delegate
|
this.Invoke((MethodInvoker)(delegate
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -303,6 +303,7 @@ namespace v2rayN.Handler
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (p.HasExited) return;
|
||||||
p.CloseMainWindow();
|
p.CloseMainWindow();
|
||||||
p.WaitForExit(100);
|
p.WaitForExit(100);
|
||||||
if (!p.HasExited)
|
if (!p.HasExited)
|
||||||
|
|||||||
@@ -138,6 +138,7 @@ namespace v2rayN.HttpProxyHandler
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (p.HasExited) return; // someting, while the GUI app is exiting.
|
||||||
p.CloseMainWindow();
|
p.CloseMainWindow();
|
||||||
p.WaitForExit(100);
|
p.WaitForExit(100);
|
||||||
if (!p.HasExited)
|
if (!p.HasExited)
|
||||||
|
|||||||
Reference in New Issue
Block a user