fix race in ssl init