eclipse-archived / californium.core

Californium project
86 stars 69 forks source link

Bugfix cancel request with blockwise response #42

Closed boaks closed 9 years ago

boaks commented 9 years ago

Fixes bugs.eclipse.org #475866

Signed-off-by: Achim Kraus achim.kraus@bosch-si.com

mkovatsc commented 9 years ago

At the moment, it is not the partial assembled response, but just the current block. Yet do we actually need to send a response up the stack? No one should be expecting it...

boaks commented 9 years ago

Uups, comment and logging message mentioning "assembled/accumulated" message are "deprecated". I forgot to update them. Yes the caller will never see the response, because the request is canceled. But there may be interaction/cleanup of the lower layers and so I don't want to skip them. Therefore I call the "super.receiveResponse".

mkovatsc commented 9 years ago

receiveResponse hands it upward, but layers above the BlockwiseLayer should never see individual blocks. Thus, we can skip this---it is canceled anyway :)

boaks commented 9 years ago

OK, your right. I will remove comments and call to "super.receiveResponse".

mkovatsc commented 9 years ago

I added a fix that also deals with block+observe in fedf1a8749d4032f8ae25ede85454078fba70f0e. I also included your test extension. Thanks for raising this!