Fix for case where we're trying to Write to a blocking stream, and we're out of buffer space. This should block. r=rpotts

This commit is contained in:
warren%netscape.com 1999-11-13 06:16:52 +00:00
Родитель a37a27d9e9
Коммит 38804a8859
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -621,7 +621,7 @@ nsPipe::nsPipeOutputStream::WriteSegments(nsReadSegmentFun reader,
if (NS_FAILED(rv)) if (NS_FAILED(rv))
goto done; goto done;
if (writeBufLen == 0) { if (writeBufLen == 0) {
if (*writeCount > 0) if (*writeCount > 0 && !mBlocking)
goto done; goto done;
if (pipe->mObserver/* && *writeCount == 0*/) { if (pipe->mObserver/* && *writeCount == 0*/) {
mon.Exit(); // XXXbe avoid deadlock better mon.Exit(); // XXXbe avoid deadlock better