Ticket #123 (closed defect: fixed)
libyaml parser hangs when reading all in one read from a TCP socket.
|Reported by:||pem@…||Owned by:||xi|
When setting a read handler (which uses read(2)) with yaml_parser_set_input() and reading from a socket descriptor, it happens that the entire yaml document is read in one call of the handler. This seems to confuse the parser (yaml_parser_load()) which calls the handler again, attempting to read more.
Forcing at least two packages from the client makes it work. The workaround was to make the client write and flush the leading "---" separately, and then dump the rest on the socket.
This is with libyaml 0.1.2. The client side is using SnakeYAML 1.1 (with java 1.6), both on openSuse 11.0.