diff --git a/main.c b/main.c index 46793b0..7c859e9 100644 --- a/main.c +++ b/main.c @@ -655,11 +655,11 @@ void server(int port) { // fork ssh server ssh_pid = fork(); - if (ssh_pid > 0) { + if (ssh_pid == 0) { serverssh(conf.ssh_port); exit(0); } - if (ssh_pid != 0) { + if (ssh_pid < 0) { fprintf(stderr, "Error forking ssh server."); } }