base-bearer: fix check for cancellation
If we cancel connect_cancellable, the connect task will return a G_IO_ERROR_CANCELLED. We may need to do some cleanup (like, disconnect if the connection went far enough to actually start the network connection), thus it's important we check for cancellation correctly.
This commit is contained in:

committed by
Aleksander Morgado

parent
aaea6c77f2
commit
eaaf64ffce
@@ -709,9 +709,8 @@ connect_ready (MMBaseBearer *self,
|
||||
mm_dbg ("Couldn't connect bearer '%s': '%s'",
|
||||
self->priv->path,
|
||||
error->message);
|
||||
if (g_error_matches (error,
|
||||
MM_CORE_ERROR,
|
||||
MM_CORE_ERROR_CANCELLED)) {
|
||||
if ( g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_CANCELLED)
|
||||
|| g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
|
||||
/* Will launch disconnection */
|
||||
launch_disconnect = TRUE;
|
||||
} else
|
||||
|
Reference in New Issue
Block a user