aProtocol->TellThreadToDie(PR_FALSE);
aProtocol->TellThreadToDie(PR_TRUE);
nsImapIncomingServer::ConnectionTimeOut(nsIImapProtocol* aConnection){    PRBool retVal = PR_FALSE;    if (!aConnection) return retVal;    nsresult rv;    PR_CEnterMonitor(this);    PRInt32 timeoutInMinutes = 0;    rv = GetTimeOutLimits(&timeoutInMinutes);    if (NS_FAILED(rv) || timeoutInMinutes <= 0 || timeoutInMinutes > 29)    {        timeoutInMinutes = 29;        SetTimeOutLimits(timeoutInMinutes);    }    PRTime cacheTimeoutLimits;    LL_I2L(cacheTimeoutLimits, timeoutInMinutes * 60 * 1000000); // in                                                              // microseconds    PRTime lastActiveTimeStamp;    rv = aConnection->GetLastActiveTimeStamp(&lastActiveTimeStamp);    PRTime elapsedTime;    LL_SUB(elapsedTime, PR_Now(), lastActiveTimeStamp);    PRTime t;    LL_SUB(t, elapsedTime, cacheTimeoutLimits);    if (LL_GE_ZERO(t))    {        nsCOMPtr<nsIImapProtocol> aProtocol(do_QueryInterface(aConnection,                                                              &rv));        if (NS_SUCCEEDED(rv) && aProtocol)        {            m_connectionCache->RemoveElement(aConnection);            aProtocol->TellThreadToDie(PR_FALSE);            retVal = PR_TRUE;        }    }    PR_CExitMonitor(this);    return retVal;}