implemented socket disconnect