Check whether socket is still open