Handle unknown request type
This commit is contained in:
parent
0d164aef3d
commit
0d0db949af
@ -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