Check that socket is not going away when setting socket to