Skip to content

Commit

Permalink
Merge pull request #337 from JKRhb/observe-fix
Browse files Browse the repository at this point in the history
fix(agent): fix bug in observe option check
  • Loading branch information
Apollon77 committed Apr 21, 2022
2 parents 67c12da + e07bd45 commit 96ebfca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ class Agent extends EventEmitter {
req.setOption('Observe', url.observe)
} else if (typeof (url.observe) === 'string') {
req.setOption('Observe', parseInt(url.observe))
} else if (url.observe === true || url.observe != null) {
} else if (url.observe === true) {
req.setOption('Observe', 0)
} else {
req.on('response', this._cleanUp.bind(this))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "coap",
"version": "1.0.5",
"version": "1.0.6",
"description": "A CoAP library for node modelled after 'http'",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit 96ebfca

Please sign in to comment.