mirror of
https://github.com/jwetzell/psn-go.git
synced 2026-08-20 06:29:10 +00:00
have decoder return err
This commit is contained in:
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"net"
|
||||
"time"
|
||||
|
||||
@@ -35,7 +36,10 @@ func main() {
|
||||
}
|
||||
|
||||
if length > 0 {
|
||||
decoder.Decode(buffer)
|
||||
err := decoder.Decode(buffer)
|
||||
if err != nil {
|
||||
slog.Error("error decoding", "err", err)
|
||||
}
|
||||
}
|
||||
|
||||
if time.Now().UnixMilli()-lastPrintMillis > 1000 {
|
||||
|
||||
Reference in New Issue
Block a user