Fix completely broken exception handling in -[connect].
This commit is contained in:
parent
95fe343184
commit
35957ae3c3
1 changed files with 8 additions and 9 deletions
|
@ -201,23 +201,22 @@
|
|||
[XMPPSRVEnumerator enumeratorWithDomain: server];
|
||||
XMPPSRVEntry *candidate;
|
||||
|
||||
while ((candidate = [SRVEnumerator nextObject])) {
|
||||
while ((candidate = [SRVEnumerator nextObject]) != nil) {
|
||||
@try {
|
||||
[sock connectToHost: [candidate target]
|
||||
onPort: [candidate port]];
|
||||
break;
|
||||
} @catch (id e) {
|
||||
if (([e class] == [OFAddressTranslationFailedException
|
||||
class]) || ([e class] ==
|
||||
[OFConnectionFailedException class]))
|
||||
continue;
|
||||
else
|
||||
@throw e;
|
||||
} @catch (OFAddressTranslationFailedException *e) {
|
||||
[e release];
|
||||
} @catch (OFConnectionFailedException *e) {
|
||||
[e release];
|
||||
}
|
||||
}
|
||||
|
||||
if (!candidate)
|
||||
[sock connectToHost: server
|
||||
onPort: port];
|
||||
|
||||
[self XMPP_startStream];
|
||||
|
||||
[pool release];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue