QMI bearer: race condition when WDS disconnection indication received during connection attempt
Looks like if we get a WDS indication reporting disconnection during the connection attempt (e.g. in between a successful start network operation and the current settings retrieval), we may end up reporting the modem connected while it isn't in reality:
2019-10-30T00:52:51.629 INFO daemon ModemManager[4818]: <info> Simple connect started...
2019-10-30T00:52:51.629 INFO daemon ModemManager[4818]: <info> Simple connect state (4/8): Wait to get fully enabled
2019-10-30T00:52:51.629 INFO daemon ModemManager[4818]: <info> Simple connect state (5/8): Register
2019-10-30T00:52:51.629 INFO daemon ModemManager[4818]: <info> Simple connect state (6/8): Bearer
2019-10-30T00:52:51.629 INFO daemon ModemManager[4818]: <info> Simple connect state (7/8): Connect
2019-10-30T00:52:51.629 INFO daemon ModemManager[4818]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: state changed (registered -> connecting)
2019-10-30T00:52:52.414 INFO daemon ModemManager[4818]: <info> bearer call end reason (1): 'generic-unspecified'
2019-10-30T00:52:52.414 INFO daemon ModemManager[4818]: <info> bearer verbose call end reason (3,1028): [cm] (NULL)
2019-10-30T00:52:52.415 INFO daemon ModemManager[4818]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> registered)
2019-10-30T00:52:52.606 INFO daemon ModemManager[4818]: <info> error: couldn't get current settings: QMI protocol error (15): 'OutOfCall'
2019-10-30T00:52:52.607 INFO daemon ModemManager[4818]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: state changed (registered -> connected)
2019-10-30T00:52:52.607 INFO daemon ModemManager[4818]: <info> Simple connect state (8/8): All done
2019-10-30T00:52:52.670 WARNIN daemon ModemManager[4818]: <warn> Reloading stats failed: Couldn't get packet statistics: QMI protocol error (15): 'OutOfCall'