celix icon indicating copy to clipboard operation
celix copied to clipboard

Erroneous error handling in http admin

Open pnoltes opened this issue 2 years ago • 0 comments

There are several issues in the http admin error handling:

  1. If httpAdmin_create finally fails here, an error code should be returned instead.
  2. The above applies to websocketAdmin_create.
  3. httpAdmin_create should take the responsibility of releasing httpRoot in error condition, which is currently not done.
  4. In http_admin_stop, various resources is NOT released in reverse order as they are acquired.

Our new error injector may help testing this.

Originally posted by @PengZheng in https://github.com/apache/celix/pull/476#discussion_r1111598092

pnoltes avatar Feb 21 '23 18:02 pnoltes