Rework Geary.Imap.ClientConnection signal and error handling
Remove connect, disconnect and close_error signals, since they are implied by their respective methods completing and/or throwing an error. Remove Deserializer pass-through signals, treat all three kinds as generic receive errors instead. Make Deserializer emit end-of-stream signal only on EOS, not on EOS and on receive error, so it only signals an error condition once.
This commit is contained in:
parent
7e77133bda
commit
62f1df12cb
4 changed files with 38 additions and 79 deletions
|
|
@ -265,7 +265,7 @@ class Geary.Imap.DeserializerTest : TestCase {
|
|||
this.stream.add_data(bye.data);
|
||||
|
||||
bool eos = false;
|
||||
this.deser.eos.connect(() => { eos = true; });
|
||||
this.deser.end_of_stream.connect(() => { eos = true; });
|
||||
|
||||
this.process.begin(Expect.MESSAGE, (obj, ret) => { async_complete(ret); });
|
||||
RootParameters? message = this.process.end(async_result());
|
||||
|
|
@ -283,7 +283,7 @@ class Geary.Imap.DeserializerTest : TestCase {
|
|||
|
||||
this.deser.parameters_ready.connect((param) => { message = param; });
|
||||
this.deser.bytes_received.connect((count) => { bytes_received += count; });
|
||||
this.deser.eos.connect((param) => { eos = true; });
|
||||
this.deser.end_of_stream.connect((param) => { eos = true; });
|
||||
this.deser.deserialize_failure.connect(() => { deserialize_failure = true; });
|
||||
this.deser.receive_failure.connect((err) => { receive_failure = true;});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue