Close socket in specs to avoid hang up after tests due to open handles