Fix SSL socketWrite waiting