Skip to content

Commit

Permalink
check rpc err on terminate cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
moloch-- committed Feb 13, 2022
1 parent de31135 commit 34738d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions client/command/processes/terminate.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ func TerminateCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
Pid: int32(pid),
Force: ctx.Flags.Bool("force"),
})
if err != nil {
con.PrintErrorf("Terminate failed: %s", err)
return
}

if terminated.Response != nil && terminated.Response.Async {
con.AddBeaconCallback(terminated.Response.TaskID, func(task *clientpb.BeaconTask) {
Expand Down
2 changes: 1 addition & 1 deletion server/core/sessions.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func (s *sessions) Remove(sessionID string) {
for _, child := range children {
childSession, ok := s.sessions.LoadAndDelete(child.SessionID)
if ok {
// PivotSessions.Delete(childSession.(*Session).Connection.ID)
PivotSessions.Delete(childSession.(*Session).Connection.ID)
EventBroker.Publish(Event{
EventType: consts.SessionClosedEvent,
Session: childSession.(*Session),
Expand Down

0 comments on commit 34738d2

Please sign in to comment.