Skip to content

Commit

Permalink
fixes for moving nowait into NewRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
levb committed Jun 20, 2024
1 parent 00efd84 commit 25490e1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/mqtt.go
Original file line number Diff line number Diff line change
Expand Up @@ -1563,6 +1563,10 @@ func (jsa *mqttJSA) newRequestEx(kind, subject, cidHash string, hdr int, msg []b
if err != nil {
return nil, err
}
if timeout == 0{
return nil, err
}

if len(responses) != 1 {
return nil, fmt.Errorf("unreachable: invalid number of responses (%d)", len(responses))
}
Expand Down Expand Up @@ -1719,6 +1723,9 @@ func (jsa *mqttJSA) deleteConsumer(streamName, consName string, noWait bool) (*J
if err != nil {
return nil, err
}
if noWait {
return nil, nil
}
cdr := cdri.(*JSApiConsumerDeleteResponse)
return cdr, cdr.ToError()
}
Expand Down

0 comments on commit 25490e1

Please sign in to comment.