@@ -72,11 +72,11 @@ OFString *_host; uint16_t _port; id _target; SEL _selector; # ifdef OF_HAVE_BLOCKS - of_tcp_socket_async_connect_block_t _connectBlock; + of_tcp_socket_async_connect_block_t _block; # endif OFException *_exception; } - initWithSourceThread: (OFThread*)sourceThread @@ -131,11 +131,11 @@ @try { _sourceThread = [sourceThread retain]; _socket = [socket retain]; _host = [host copy]; _port = port; - _connectBlock = [block copy]; + _block = [block copy]; } @catch (id e) { [self release]; @throw e; } @@ -148,11 +148,11 @@ [_sourceThread release]; [_socket release]; [_host release]; [_target release]; # ifdef OF_HAVE_BLOCKS - [_connectBlock release]; + [_block release]; # endif [_exception release]; [super dealloc]; } @@ -160,12 +160,12 @@ - (void)didConnect { [self join]; # ifdef OF_HAVE_BLOCKS - if (_connectBlock != NULL) - _connectBlock(_socket, _exception); + if (_block != NULL) + _block(_socket, _exception); else { # endif void (*func)(id, SEL, OFTCPSocket*, OFException*) = (void(*)(id, SEL, OFTCPSocket*, OFException*))[_target methodForSelector: _selector]; @@ -182,11 +182,11 @@ @try { [_socket connectToHost: _host port: _port]; } @catch (OFException *e) { - _exception = [[e retain] autorelease]; + _exception = e; } [self performSelector: @selector(didConnect) onThread: _sourceThread waitUntilDone: false];