diff --git a/lib/mongo/session.ex b/lib/mongo/session.ex index c312ff2e..da9e892a 100644 --- a/lib/mongo/session.ex +++ b/lib/mongo/session.ex @@ -62,7 +62,7 @@ defmodule Mongo.Session do """ @spec end_session(session()) :: :ok def end_session(pid) do - with {:ok, id, txn} <- :gen_statem.call(pid, :end_session) do + with {:ok, %{id: id, txn: txn}} <- :gen_statem.call(pid, :end_session) do Mongo.SessionPool.checkin(id, txn) end end