Skip to content

Commit

Permalink
fix(agent): correctly handle false observe values (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb authored May 19, 2022
1 parent 170322d commit 23b2008
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 23b2008

Please sign in to comment.