Skip to content

Conversation

@joshk
Copy link
Contributor

@joshk joshk commented Oct 26, 2025

A continuation of #127

Comment on lines +45 to 49
@spec reconnect!(GenServer.server()) :: :ok
def reconnect!(server \\ __MODULE__) do
GenServer.cast(server, :reconnect)
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change to a ! function? The trailing bang idiom usually denotes the function will succeed or raise. In this case, it is a cast which will always return :ok

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as Connor mentioned, there already exists a reconnect function and defining a new one makes elixir unhappy.

We can call it something else, suggestions welcome. Since Socket isn’t publicly documented, we can use whatever name we want.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooo! Right, I had forgotten about that. The use macro strikes again!

This seems fine. I don't have any better name ideas for now

@joshk joshk force-pushed the allow-for-multiple-sockets-to-run branch from fbe7b9e to 46cd4c9 Compare October 29, 2025 04:16
@joshk joshk requested a review from jjcarstens October 29, 2025 19:52
@joshk joshk merged commit 6db5e4f into main Oct 30, 2025
8 checks passed
@joshk joshk deleted the allow-for-multiple-sockets-to-run branch October 30, 2025 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants