In h1_init(), instead of calling h1_recv() directly, just wake the tasklet,
so that the receive will be done later.
h1_init() might be called from connect_server(), which is itself called
indirectly from process_stream(), and if the receive fails, we may call
si_cs_process(), which may destroy the channel buffers while process_stream()
still expects them to exist.
This should be backported to 1.9.
task_queue(t);
/* Try to read, if nothing is available yet we'll just subscribe */
- if (h1_recv(h1c))
- h1_process(h1c);
+ tasklet_wakeup(h1c->wait_event.task);
/* mux->wake will be called soon to complete the operation */
return 0;