show error if server.pid == pid

This PR adds changes to catch error when `server.pid` and `pid` are the same
GSoC/Meterpreter_Web_Console
Auxilus 2018-07-14 16:32:38 +05:30 committed by GitHub
parent 4e5ad576b2
commit 71e25f1494
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -1113,7 +1113,11 @@ class Console::CommandDispatcher::Core
print_status("#{existing_relays.length} TCP relay(s) removed.")
end
end
if server.pid == pid
print_error("Process already running at PID #{pid}")
return
end
server ? print_status("Migrating from #{server.pid} to #{pid}...") : print_status("Migrating to #{pid}")
# Do this thang.