Skip to content

Commit 2c8d5ff

Browse files
committed
Add missing host parameter to exception call
1 parent aa67841 commit 2c8d5ff

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/mongo_db_connection/utils.ex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,14 @@ defmodule Mongo.MongoDBConnection.Utils do
111111
end
112112
end
113113

114-
defp send_error(reason, s) do
115-
error = Mongo.Error.exception(tag: :tcp, action: "send", reason: reason)
116-
{:disconnect, error, s}
114+
defp send_error(reason, state) do
115+
error = Mongo.Error.exception(tag: :tcp, action: "send", reason: reason, host: state.host)
116+
{:disconnect, error, state}
117117
end
118118

119-
defp recv_error(reason, s) do
120-
error = Mongo.Error.exception(tag: :tcp, action: "recv", reason: reason)
121-
{:disconnect, error, s}
119+
defp recv_error(reason, state) do
120+
error = Mongo.Error.exception(tag: :tcp, action: "recv", reason: reason, host: state.host)
121+
{:disconnect, error, state}
122122
end
123123

124124
def namespace(coll, state, nil), do: [state.database, ?. | coll]

0 commit comments

Comments
 (0)