Skip to content

libqmi-glib,proxy: fix loss of last requests on client hangup

If a client sends requests just before the client disconnects, these may get lost. The reason is that connection_readable_cb() may be called with both G_IO_IN and G_IO_HUP set; in that case the hangup is processed immediately and received requests are lost.

This commit changes behaviour so that incoming data is processed first (if available) before disconnecting from client.

In practice, this problem caused CID leaking with ModemManager; the last Release CID requests could get lost when ModemManager was closing down the QMI port.

Merge request reports

Loading