method to identify closed socket changed