I think this should use promise same promise API as commented for close.