From 62f6e4dbe736fc30cf34a293aa0cfd4559146342 Mon Sep 17 00:00:00 2001 From: David Rose Date: Sun, 8 Nov 2009 22:06:23 +0000 Subject: [PATCH] fix bug with initial writes to an open connection getting lost --- panda/src/downloader/bioStreamBuf.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panda/src/downloader/bioStreamBuf.cxx b/panda/src/downloader/bioStreamBuf.cxx index b777727c51..0228c6045b 100644 --- a/panda/src/downloader/bioStreamBuf.cxx +++ b/panda/src/downloader/bioStreamBuf.cxx @@ -142,7 +142,7 @@ sync() { size_t n = pptr() - pbase(); - if (downloader_cat.is_spam()) { + if (downloader_cat.is_spam() && n != 0) { downloader_cat.spam() << "BioStreamBuf::sync, " << n << " bytes\n"; } @@ -262,7 +262,7 @@ write_chars(const char *start, size_t length) { // without a retry request //_write_open = BIO_should_retry(*_source); //_write_open = !BIO_eof(*_source); - _write_open = (BIO_should_write(*_source) != 0); + _write_open = (BIO_should_write(*_source) != 0 || BIO_should_retry(*_source) != 0); if (!_write_open) { return wrote_so_far; }