killThread = PR_TRUE;
NS_IMETHODIMP nsImapProtocol::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult aStatus){  PRBool killThread = PR_TRUE; // we always want to kill the thread, I believe.  if (NS_FAILED(aStatus))   {    switch (aStatus)     {        case NS_ERROR_UNKNOWN_HOST:            AlertUserEventUsingId(IMAP_UNKNOWN_HOST_ERROR);            killThread = PR_TRUE;            break;        case NS_ERROR_CONNECTION_REFUSED:            AlertUserEventUsingId(IMAP_CONNECTION_REFUSED_ERROR);            killThread = PR_TRUE;            break;        case NS_ERROR_NET_TIMEOUT:            AlertUserEventUsingId(IMAP_NET_TIMEOUT_ERROR);            killThread = PR_TRUE;            break;        default:            break;    }  }  PR_CEnterMonitor(this);  mAsyncReadRequest = nsnull; // don't need to cache this anymore, it's going away  if (killThread == PR_TRUE)   {    ClearFlag(IMAP_CONNECTION_IS_OPEN);    TellThreadToDie(PR_FALSE);  }    m_channel = nsnull;  m_outputStream = nsnull;  m_inputStream = nsnull;  PR_CExitMonitor(this);  return NS_OK;}