fix the SSL connection hang up