avoid close socket when doing upgrade event