Skip to content

Commit

Permalink
fix: fix observe when receiving block2 response (#343)
Browse files Browse the repository at this point in the history
* fix: fix observe when receiving block2 response

* chore: bump version to 1.0.9
  • Loading branch information
JKRhb authored May 11, 2022
1 parent 5566803 commit 412a400
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 @@ -332,7 +332,7 @@ class Agent extends EventEmitter {
// TODO There is a previous response but is not an ObserveStream !
return
}
} else if (block2 != null && packet.token != null) {
} else if (block2 != null && packet.token != null && !observe) {
this._tkToReq.delete(packet.token.toString('hex'))
} else if (!observe && !req.multicast) {
// it is not, so delete the token
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.8",
"version": "1.0.9",
"description": "A CoAP library for node modelled after 'http'",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit 412a400

Please sign in to comment.