bearer: set state as DISCONNECTING as soon as we cancel the connection sequence
Just when we request to cancel the connection we need to set the bearer as being disconnected, so that we do not end up overwriting connection cancellation requests. Reported by: Thieu Le <thieule@chromium.org>
This commit is contained in:
@@ -466,6 +466,9 @@ mm_bearer_disconnect (MMBearer *self,
|
|||||||
/* If currently connecting, try to cancel that operation, and wait to get
|
/* If currently connecting, try to cancel that operation, and wait to get
|
||||||
* disconnected. */
|
* disconnected. */
|
||||||
if (self->priv->status == MM_BEARER_STATUS_CONNECTING) {
|
if (self->priv->status == MM_BEARER_STATUS_CONNECTING) {
|
||||||
|
/* Set ourselves as disconnecting */
|
||||||
|
bearer_update_status (self, MM_BEARER_STATUS_DISCONNECTING);
|
||||||
|
|
||||||
/* We MUST ensure that we get to DISCONNECTED */
|
/* We MUST ensure that we get to DISCONNECTED */
|
||||||
g_cancellable_cancel (self->priv->connect_cancellable);
|
g_cancellable_cancel (self->priv->connect_cancellable);
|
||||||
/* Note that we only allow to remove disconnected bearers, so should
|
/* Note that we only allow to remove disconnected bearers, so should
|
||||||
|
Reference in New Issue
Block a user