Handle unknown request type
This commit is contained in:
parent
cf7dbd0b9c
commit
5c8fd72f85
@ -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))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user