fix ssl open and read return error bug