1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2024-12-14 12:37:31 +00:00

Do not send a reply for reply messages

This commit is contained in:
postmannen 2023-01-10 09:29:24 +01:00
parent 6aecc9c22b
commit 0ee4f979f3

View file

@ -174,9 +174,10 @@ const (
// The mapping of all the method constants specified, what type
// it references, and the kind if it is an Event or Command, and
// if it is ACK or NACK.
// Allowed values for the Event field are:
// - EventACK
// - EventNack
//
// Allowed values for the Event field are:
// - EventACK
// - EventNack
//
// The primary use of this table is that messages are not able to
// pass the actual type of the request since it is sent as a string,
@ -433,7 +434,7 @@ func (ma MethodsAvailable) CheckIfExists(m Method) (methodHandler, bool) {
func newReplyMessage(proc process, message Message, outData []byte) {
// If REQNone is specified, we don't want to send a reply message
// so we silently just return without sending anything.
if message.ReplyMethod == "REQNone" {
if message.ReplyMethod == "REQNone" || message.IsReply {
return
}