WebSockets: only poll IO stream when needed
Instead of having two pollable sources constantly running, always try to read/write without blocking and start polling if the operation returns G_IO_ERROR_WOULD_BLOCK. This patch also fixes test /websocket/direct/close-after-close that was passing but not actually testing what we wanted, because the client close was never sent. When the mutex is released, the frame has been queued, but not sent.
Showing with 77 additions and 43 deletions