ObjFW  Diff

Differences From Artifact [964085efa2]:

To Artifact [8701d2b9f0]:


40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
40
41
42
43
44
45
46



47
48
49
50
51
52
53







-
-
-







#endif
#import "OFSortedList.h"
#import "OFTimer.h"
#import "OFTimer+Private.h"
#import "OFDate.h"

#import "OFObserveFailedException.h"
#ifdef OF_HAVE_SOCKETS
# import "OFConnectionFailedException.h"
#endif

of_run_loop_mode_t of_run_loop_mode_default = @"of_run_loop_mode_default";
static OFRunLoop *mainRunLoop = nil;

@interface OFRunLoopState: OFObject
#ifdef OF_HAVE_SOCKETS
    <OFKernelEventObserverDelegate>
716
717
718
719
720
721
722
723
724

725
726
727

728
729
730
731
732
733
734
713
714
715
716
717
718
719


720



721
722
723
724
725
726
727
728







-
-
+
-
-
-
+







@implementation OFRunLoopConnectQueueItem
- (bool)handleObject: (id)object
{
	id exception = nil;
	int errNo;

	if ((errNo = [object of_socketError]) != 0)
		exception = [OFConnectionFailedException
		    exceptionWithHost: nil
		exception =
				 port: 0
			       socket: object
				errNo: errNo];
		    [_delegate of_connectionFailedExceptionForErrNo: errNo];

	if ([_delegate respondsToSelector:
	    @selector(of_socketDidConnect:exception:)]) {
		/*
		 * Make sure we only call the delegate once we removed the
		 * socket from the kernel event observer. This is necessary as
		 * otherwise we could try to connect to the next address and it