Handle unknown request type

This commit is contained in:
Elara 2021-10-24 01:11:57 -07:00
parent cf7dbd0b9c
commit 5c8fd72f85

View File

@ -443,6 +443,8 @@ func handleConnection(conn net.Conn, dev *infinitime.Device) {
// Stop notifications // Stop notifications
done.Done(reqID) done.Done(reqID)
json.NewEncoder(conn).Encode(types.Response{Type: req.Type}) json.NewEncoder(conn).Encode(types.Response{Type: req.Type})
default:
connErr(conn, req.Type, nil, fmt.Sprintf("Unknown request type %d", req.Type))
} }
} }
} }