go-coap icon indicating copy to clipboard operation
go-coap copied to clipboard

Combination of blockwise and observe not working

Open azambranogalbis opened this issue 1 year ago • 1 comments

Observing a resource whose payload needs more than 1 block to be transferred is not working. The sequence of messages is as follows:

  • Client performs first GET, with observe flag set
  • Server responds back with block #0. Due to the check in https://github.com/plgd-dev/go-coap/blob/master/net/blockwise/blockwise.go#L543, this execution does not reach to store anything in sendingMessagesCache
  • Client perfoms second GET of block #1
  • Check at https://github.com/plgd-dev/go-coap/blob/master/net/blockwise/blockwise.go#L361, will return that sendingMessageExist is false. Final effect is that server responds block #0 again. Which breaks the logic in the client

Removing check at https://github.com/plgd-dev/go-coap/blob/master/net/blockwise/blockwise.go#L543 solves the issue.

azambranogalbis avatar Aug 29 '24 12:08 azambranogalbis

@azambranogalbis Hi, do you have an example for blockwise transfer from client to server?

Thank you.

EfraimManurung avatar Dec 04 '24 16:12 EfraimManurung