Skip to content

Commit

Permalink
fix(agent): correctly handle false observe values
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed May 18, 2022
1 parent 170322d commit ba68e1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ class Agent extends EventEmitter {
_setObserveOption (req: OutgoingMessage, requestParameters: CoapRequestParams): void {
const observeParameter = requestParameters.observe

if (observeParameter == null) {
if (observeParameter == null || observeParameter === false) {
req.on('response', this._cleanUp.bind(this))
return
}
Expand Down

0 comments on commit ba68e1d

Please sign in to comment.