Fix for Bug 56170 "After mac goes to sleep, getting IMAP mail locks up machine". Changed case kOTOutStateErr, so that it returns an error. This enables us to detect when a connection is closed out from under us.

This commit is contained in:
gordon%netscape.com 2000-10-13 21:49:44 +00:00
parent 84e1ee9c31
commit 391c95c667

View File

@ -1482,9 +1482,6 @@ static PRInt32 SendReceiveStream(PRFileDesc *fd, void *buf, PRInt32 amount,
return result;
} else {
switch (result) {
case kOTOutStateErr: // it has been closed
return 0;
case kOTLookErr:
PR_ASSERT(!"call to OTLook() required after all.");
break;
@ -1504,6 +1501,7 @@ static PRInt32 SendReceiveStream(PRFileDesc *fd, void *buf, PRInt32 amount,
goto ErrorExit;
break;
case kOTOutStateErr: // it has been closed, fall through for error
default:
err = result;
goto ErrorExit;