Fix Jingle connection code when cancellable
is null
This commit is contained in:
parent
6494d7a45d
commit
34d7b5f515
|
@ -838,12 +838,17 @@ 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;
|
||||
if (cancellable != null) {
|
||||
cancellable.disconnect(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void handle_connection_error(IOError error) {
|
||||
Session? strong = session;
|
||||
if (strong != null) {
|
||||
|
|
Loading…
Reference in a new issue