From bccfe80a59c2499077c16b9ecaa5eabb6161b919 Mon Sep 17 00:00:00 2001 From: Aleksander Mamla Date: Mon, 2 Nov 2020 22:43:04 +0100 Subject: [PATCH] Properly checking in ended sessions (#350) --- lib/mongo/session.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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