can now detect whos socket has ended