NXP-14185 return connection on close and disconnect core session before commit