add esb connection cleanup function