leshan: Better handle unexpected error in DefaultRegistrationEngine.

Hello,

If the procedure inside of ClientInitiatedBootstrapTask, UpdateRegistrationTask, and/or RegistrationTask raises an unexpected exception, that exception caught by a catch clause and it logs that, but that task never works after caught and unfortunately the process still alive.

For example, if registerWithRetry() that is in RegistrationTask#run() raises a RuntimeException, that task never scheduled anymore (i.e. that process does nothing).

This behavior makes it a little bit hard to implement a robust LwM2M client. I think it would be better to provide a way to exit when it falls into an unexpected situation.

What do you think about this?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 21 (21 by maintainers)

Commits related to this issue

Most upvoted comments

In my understanding, I finished my work on the master branch.

Do you plan to backport this on 1.x, soon ?

Yeah, I’d like to backport those features to the 1.x project (actually this is just what I needed 😄 ). I’m going to try that according to your suggestion.