Skip to content

Commit a3b61dc

Browse files
author
Brent Cook
committed
Land rapid7#5488, fix job stopping from RPC service
2 parents e151e38 + 910ae8a commit a3b61dc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/msf/core/rpc/v10/rpc_job.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ def rpc_list
2828
# @example Here's how you would use this from the client:
2929
# rpc.call('job.stop', 0)
3030
def rpc_stop(jid)
31-
obj = self.framework.jobs[jid.to_s]
31+
jid = jid.to_s
32+
obj = self.framework.jobs[jid]
3233
error(500, "Invalid Job") if not obj
33-
obj.stop
34+
self.framework.jobs.stop_job(jid)
3435
{ "result" => "success" }
3536
end
3637

0 commit comments

Comments
 (0)