Skip to content

Commit ea37cd4

Browse files
author
James William Pye
committed
Protect against the initializing transaction being marked as an eof.
1 parent d3a941e commit ea37cd4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

postgresql/driver/pq3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ def read(self, quantity = None):
441441
self._contract()
442442
offset, buffer = self._state[:2]
443443
if self._state[2] != None and \
444-
(len(buffer) - offset) > (self.chunksize // 8):
444+
((len(buffer) - offset) > (self.chunksize // 8) or not buffer):
445445
# Transaction ready, but only attempt expanding if it
446446
# will be needed soon.
447447
##

0 commit comments

Comments
 (0)