From 7d170662895e4993374597758f4f9608eab3e66c Mon Sep 17 00:00:00 2001 From: Reese Norris Date: Sun, 25 May 2025 14:00:14 -0700 Subject: [PATCH] properly initialize Client latlon --- fsd/client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fsd/client.go b/fsd/client.go index 1fa91e1..e5af535 100644 --- a/fsd/client.go +++ b/fsd/client.go @@ -43,7 +43,7 @@ type LatLon struct { func newClient(ctx context.Context, conn net.Conn, scanner *bufio.Scanner, loginData loginData) (client *Client) { clientCtx, cancel := context.WithCancel(ctx) - return &Client{ + client = &Client{ conn: conn, scanner: scanner, ctx: clientCtx, @@ -51,6 +51,8 @@ func newClient(ctx context.Context, conn net.Conn, scanner *bufio.Scanner, login sendChan: make(chan string, 32), loginData: loginData, } + client.setLatLon(0, 0) + return } func (c *Client) senderWorker() {