Update Geary.Imap.ClientSession connect timeout handling

Allow specifying the connect greeting timeout length, ensure that
any connect errors are in place before releasing the connect waiter,
add unit test to ensure it works properly.
This commit is contained in:
Michael Gratton 2019-12-29 17:01:28 +10:30 committed by Michael James Gratton
parent 54156003b4
commit 13d43d41b2
5 changed files with 91 additions and 48 deletions

View file

@ -41,7 +41,7 @@ class Integration.Imap.ClientSession : TestCase {
}
public void session_connect() throws GLib.Error {
this.session.connect_async.begin(null, async_complete_full);
this.session.connect_async.begin(2, null, async_complete_full);
this.session.connect_async.end(async_result());
this.session.disconnect_async.begin(null, async_complete_full);
@ -98,7 +98,7 @@ class Integration.Imap.ClientSession : TestCase {
}
private void do_connect() throws GLib.Error {
this.session.connect_async.begin(null, async_complete_full);
this.session.connect_async.begin(5, null, async_complete_full);
this.session.connect_async.end(async_result());
}