Skip to content

Commit

Permalink
fix stream api: don't use the process dictionary here
Browse files Browse the repository at this point in the history
  • Loading branch information
zookzook committed Apr 22, 2022
1 parent 8ea005a commit acbddff
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions lib/mongo/stream.ex
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ defmodule Mongo.Stream do
case Mongo.get_session(opts) do
nil ->
with {:ok, session} <- Session.start_session(topology_pid, :read, opts) do
Process.put(:session, session)
{:own, session}
end

Expand All @@ -49,7 +48,6 @@ defmodule Mongo.Stream do

def checkin_session(:own, session, topology_pid) do
Session.end_session(topology_pid, session)
Process.delete(:session)
end

def checkin_session(:borrowed, _session, _topology_pid) do
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Mongodb.Mixfile do
use Mix.Project

@source_url "https://github.com/zookzook/elixir-mongodb-driver"
@version "0.9.0-rc.0"
@version "0.9.0-rc.1"

def project() do
[
Expand Down

0 comments on commit acbddff

Please sign in to comment.