Skip to content

feat(shard): manually shard connect and reconnect #596

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 12 commits into from
May 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(shard): fix connect arguments
  • Loading branch information
tignear committed May 15, 2024
commit cd60c218495f9601c4ecbbbf2c224cdb3c19da8a
4 changes: 2 additions & 2 deletions lib/nostrum/shard/supervisor.ex
Original file line number Diff line number Diff line change
@@ -82,7 +82,7 @@ defmodule Nostrum.Shard.Supervisor do

shard_range = lowest..highest

for num <- shard_range, do: connect(url, num - 1, total)
for num <- shard_range, do: connect([url, num - 1, total])
end

on_start
@@ -142,7 +142,7 @@ defmodule Nostrum.Shard.Supervisor do
resume_info
end

def connect(url, num, total) do
def connect([url, num, total]) do
DynamicSupervisor.start_child(__MODULE__, create_worker(url, num, total))
end