Skip to content

Commit 3c10b37

Browse files
committed
update docs
1 parent 06947d1 commit 3c10b37

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lib/mongo/event_handler.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ defmodule Mongo.EventHandler do
2424

2525
def listen(opts) do
2626
receive do
27-
{:broadcast, :commands, %{command_name: cmd} = message} when cmd != :isMaster ->
27+
{:broadcast, :commands, %{command_name: cmd} = message} when cmd != :isMaster && cmd != :hello ->
2828
Logger.info("Received command: " <> inspect(message))
2929
listen(opts)
3030

31-
{:broadcast, :commands, is_master} ->
32-
case opts[:is_master] do
33-
true -> Logger.info("Received is master:" <> inspect(is_master))
31+
{:broadcast, :commands, hello} ->
32+
case opts[:is_master] || opts[:hello] do
33+
true -> Logger.info("Received hello:" <> inspect(hello))
3434
_ -> []
3535
end
3636

lib/mongo/monitor.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ defmodule Mongo.Monitor do
55
If the network connection is working, then the monitor process reports this and the topology process starts the
66
connection pool. Per server we get 1 + pool size connections to each server.
77
8-
After waiting for `heartbeat_frequency_ms` milliseconds, the monitor process calls `isMaster` command and
8+
After waiting for `heartbeat_frequency_ms` milliseconds, the monitor process calls `hello` command and
99
reports the result to the topology process.
1010
1111
The result of the hello command is mapped the `ServerDescription` structure and sent to the topology process, which

lib/mongo/streaming_hello_monitor.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ defmodule Mongo.StreamingHelloMonitor do
7878
end
7979

8080
@doc """
81-
Time to update the topology. Calling `isMaster` and updating the server description
81+
Time to update the topology. Calling `hello` and updating the server description
8282
"""
8383
def handle_cast(:update, state) do
8484
handle_info(:update, state)

0 commit comments

Comments
 (0)