bug fix: connection close judge failed.