]> git.r.bdr.sh - rbdr/mobius/commitdiff
Fix bug in client tracker list (#106)
authorJeff Halter <redacted>
Mon, 20 Nov 2023 21:34:51 +0000 (13:34 -0800)
committerGitHub <redacted>
Mon, 20 Nov 2023 21:34:51 +0000 (13:34 -0800)
This fixes an issue where the client would connect to the incorrect server when joining from the tracker listing.

hotline/ui.go

index e3e2fabc2b39a48e2a9bb6b0042c0f1487518122..c5a0dbdb5f7021b4f1f3de6b9e7abfc3bc3ec250 100644 (file)
@@ -113,7 +113,8 @@ func (ui *UI) getTrackerList(servers []ServerRecord) *tview.List {
        list.Box.SetBorder(true).SetTitle("| Servers |")
 
        const shortcut = 97 // rune for "a"
-       for i, srv := range servers {
+       for i, _ := range servers {
+               srv := servers[i]
                list.AddItem(string(srv.Name), string(srv.Description), rune(shortcut+i), func() {
                        ui.Pages.RemovePage("joinServer")