Added exceptionhandling for the ssh-agent killing
This commit is contained in:
parent
ce2f8b99f5
commit
639a777bfe
|
@ -1152,8 +1152,8 @@ namespace SparkleShare {
|
||||||
try {
|
try {
|
||||||
int pid = Int32.Parse (System.Environment.GetEnvironmentVariable ("SSH_AGENT_PID"));
|
int pid = Int32.Parse (System.Environment.GetEnvironmentVariable ("SSH_AGENT_PID"));
|
||||||
Process.GetProcessById (pid).Kill ();
|
Process.GetProcessById (pid).Kill ();
|
||||||
} catch (Exception e) {
|
} catch (ArgumentException) {
|
||||||
// Handle exception if needed
|
SparkleHelpers.DebugInfo ("SSH", "Could not kill the ssh-agent, due to the process wasn't running");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue