Index: src/OFTCPSocket.m ================================================================== --- src/OFTCPSocket.m +++ src/OFTCPSocket.m @@ -307,11 +307,11 @@ [s connectToHost: host port: port]; timer = [OFTimer timerWithTimeInterval: 0 repeats: NO - block: ^ { + block: ^ (OFTimer *unused) { [connectThread join]; block(s); }]; [runLoop addTimer: timer]; Index: src/OFTimer.h ================================================================== --- src/OFTimer.h +++ src/OFTimer.h @@ -14,16 +14,17 @@ * file. */ #import "OFObject.h" -#ifdef OF_HAVE_BLOCKS -typedef void (^of_timer_block_t)(void); -#endif - +@class OFTimer; @class OFDate; @class OFCondition; + +#ifdef OF_HAVE_BLOCKS +typedef void (^of_timer_block_t)(OFTimer*); +#endif /** * \brief A class for creating and firing timers. */ @interface OFTimer: OFObject Index: src/OFTimer.m ================================================================== --- src/OFTimer.m +++ src/OFTimer.m @@ -343,11 +343,11 @@ { OF_ENSURE(arguments >= 0 && arguments <= 2); #ifdef OF_HAVE_BLOCKS if (block != NULL) - block(); + block(self); else { #endif switch (arguments) { case 0: [target performSelector: selector];