]> git.r.bdr.sh - rbdr/mobius/commitdiff
Fix tracker bug in multiple read case
authorJeff Halter <redacted>
Fri, 30 Jul 2021 02:36:17 +0000 (19:36 -0700)
committerJeff Halter <redacted>
Thu, 29 Jul 2021 20:36:17 +0000 (13:36 -0700)
hotline/tracker.go
hotline/ui.go [new file with mode: 0644]

index d42ff7b52dbd0df0a6423d04db8c7e37f0bb4dfc..69d9fd48aa95b00c56ae46d29867c55ed25f3d80 100644 (file)
@@ -124,6 +124,7 @@ func GetListing(addr string) ([]ServerRecord, error) {
 
        payloadSize := int(binary.BigEndian.Uint16(info.MsgDataSize[:]))
 
+       buf = buf[:readLen]
        if totalRead < payloadSize {
                for {
                        tmpBuf := make([]byte, 4096)
diff --git a/hotline/ui.go b/hotline/ui.go
new file mode 100644 (file)
index 0000000..e5acf82
--- /dev/null
@@ -0,0 +1 @@
+package hotline