Skip to content

Commit 10fd2a0

Browse files
committed
Remove pattern match on calling exec.stop/1
There is no need to pattern match on this function call. We check to confirm that the process was stopped correctly in the next line. With the current pattern match, we cause an error when the PID is already stopped.
1 parent 44ec2fb commit 10fd2a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/vector/agent.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ defmodule Vector.Agent do
8989

9090
def terminate(message, agent) when message in [:normal, :shutdown] do
9191
:ok = Logger.log(agent, :info, "vector: Vector is stopping.")
92-
:ok = :exec.stop(agent.os_pid)
92+
:exec.stop(agent.os_pid)
9393
do_confirm_exit(agent)
9494
do_flush_messages(agent)
9595
:ok = Logger.log(agent, :info, "vector: Vector has stopped.")

0 commit comments

Comments
 (0)