зеркало из https://github.com/mozilla/pjs.git
Allowing the FTP channel to Cancel() even if the underlying connection thread has gone away.
This commit is contained in:
Родитель
d15e2b034c
Коммит
30c8b96046
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче