Adjust to ObjFW changes

This commit is contained in:
Jonathan Schleifer 2018-12-21 22:45:34 +01:00
parent bdfa70b3e5
commit b8472e162b
No known key found for this signature in database
GPG key ID: D83A76BFE376345E

View file

@ -147,36 +147,22 @@ locking_callback(int mode, int n, const char *file, int line)
- (void)socket: (OF_KINDOF(OFTCPSocket *))sock
didConnectToHost: (OFString *)host
port: (uint16_t)port
exception: (id)exception
{
if (exception == nil) {
@try {
[sock SSL_startTLSWithExpectedHost: _host
port: _port];
} @catch (id e) {
[_socket setDelegate: _delegate];
[_delegate socket: sock
didFailToConnectWithException: e
host: host
port: port];
return;
exception = e;
}
}
[_socket setDelegate: _delegate];
[_delegate socket: sock
didConnectToHost: host
port: port];
}
- (void)socket: (OF_KINDOF(OFTCPSocket *))sock
didFailToConnectWithException: (id)exception
host: (OFString *)host
port: (uint16_t)port
{
[_socket setDelegate: _delegate];
return [_delegate socket: sock
didFailToConnectWithException: exception
host: host
port: port];
port: port
exception: exception];
}
@end