Modify ↓
Ticket #203 (new defect)
reading yaml from socket may block in determine_encoding()
| Reported by: | socketpair@… | Owned by: | xi |
|---|---|---|---|
| Priority: | normal | Component: | pyyaml |
| Severity: | major | Keywords: | |
| Cc: |
Description
The problem here:
reader.py:
determine_encoding():
- call self.update_raw() until receive needed length. Suppose it receives all data from the kernel buffer, i.e. in my case - full document (--- xxxxxxxx\n...\n) self.eof will not be set
- call update(1) which have the code: if not self.eof:
self.update_raw()
as the self.eof is False (we never receive empty string) we will hang for any (uneeded here) data.
############################### How to fix: just remove
if not self.eof:
self.update_raw()
Attachments
Change History
Note: See
TracTickets for help on using
tickets.


for files - is not sensible, because reading plain file never block.