From 0d0db949af62378d7fe04c6124756660aae2941c Mon Sep 17 00:00:00 2001 From: Arsen Musayelyan Date: Sun, 24 Oct 2021 01:11:57 -0700 Subject: [PATCH] Handle unknown request type --- socket.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/socket.go b/socket.go index 15d7600..d5bfe72 100644 --- a/socket.go +++ b/socket.go @@ -443,6 +443,8 @@ func handleConnection(conn net.Conn, dev *infinitime.Device) { // Stop notifications done.Done(reqID) json.NewEncoder(conn).Encode(types.Response{Type: req.Type}) + default: + connErr(conn, req.Type, nil, fmt.Sprintf("Unknown request type %d", req.Type)) } } }