Allowing the FTP channel to Cancel() even if the underlying connection thread has gone away.

This commit is contained in:
valeski%netscape.com 2000-01-12 00:51:17 +00:00
Родитель d15e2b034c
Коммит 30c8b96046
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -134,8 +134,15 @@ nsFTPChannel::IsPending(PRBool *result) {
NS_IMETHODIMP
nsFTPChannel::Cancel(void) {
nsresult rv = NS_OK;
// if we hit this assert, someone's hanging onto the channel too long.
NS_ASSERTION(mConnThread, "lost the connection thread.");
return mConnThread->Cancel();
// it's ok for this method to *not* have the underlying thread because
// the user obviously want's the underlying channel/connection to go away.
if (mConnThread)
rv = mConnThread->Cancel();
return rv;
}
NS_IMETHODIMP