Fix Jingle connection code when cancellable
is null
This commit is contained in:
parent
6494d7a45d
commit
34d7b5f515
|
@ -838,10 +838,15 @@ public class Connection : IOStream {
|
|||
return;
|
||||
}
|
||||
SourceFunc callback = wait_and_check_for_errors.callback;
|
||||
ulong id = cancellable.connect(() => callback());
|
||||
ulong id = 0;
|
||||
if (cancellable != null) {
|
||||
id = cancellable.connect(() => callback());
|
||||
}
|
||||
callbacks.add(new OnSetInnerCallback() { callback=(owned)callback, io_priority=io_priority});
|
||||
yield;
|
||||
cancellable.disconnect(id);
|
||||
if (cancellable != null) {
|
||||
cancellable.disconnect(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void handle_connection_error(IOError error) {
|
||||
|
|
Loading…
Reference in a new issue