Index: src/XMPPConnection.m ================================================================== --- src/XMPPConnection.m +++ src/XMPPConnection.m @@ -339,11 +339,11 @@ if (_socket != nil) @throw [OFAlreadyConnectedException exception]; _socket = [[OFTCPSocket alloc] init]; - [_socket setDelegate: self]; + [(OFTCPSocket *)_socket setDelegate: self]; if (_server != nil) [_socket asyncConnectToHost: _server port: _port]; else @@ -761,11 +761,11 @@ [newSock setPrivateKeyPassphrase: _privateKeyPassphrase]; #endif [newSock startTLSWithExpectedHost: nil]; [_socket release]; _socket = newSock; - [_socket setDelegate: self]; + [(OFTCPSocket *)_socket setDelegate: self]; _encrypted = true; [_delegates broadcastSelector: @selector( connectionDidUpgradeToTLS:)