diagnosed socket close bug