Yes, from the code you're treating second try of `pkgmgr_handle_ = pkgmgr_client_new(PC_LISTENING)` as error,  it is wired to me.