Just to summarize: - channel_read() reads 63 bytes and calls channel_save() - channel_save() saves those to a new node->rq_buffer at the end of channel head
To convert it to JSON someone must call channel_parse_json(), and it can be either from channel_read_json_block() or may_invoke_callback(). My logs shows that it is via may_invoke_callback() until it hangs. - may_invoke_callback() is called from channel_parse_messages() - channel_parse_messages() is called from parse_queued_messages() - parse_queued_messages() is called from inchar_loop() But, since channel_parse_json() haven't been called yet for the latest message, inchar_loop() will allow a wait_func()-call with wait_time == -1 (that leads to RealWaitForChar() NULL). To avoid it, inchar_loop() calls channel_any_readahead(), but it will return FALSE since the messages haven't been parsed to JSON yet and it only checks the JSON queue in JSON mode. So I guess the solution to this is to either let channel_any_readahead() call channel_peek() in JSON mode as well, or add a call to channel_parse_json() somewhere to ensure that the incoming message has been parsed so that channel_any_readahead() returns TRUE in JSON-mode (?). I'm sorry if my explanation is messy, it's probably a combination of me not being familiar with the code base as well as not being native English :) Best regards, Pontus -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/7ac5d58e-0935-49a5-946f-bb8ae47cabf9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.