Differences From Artifact [e3f56ac740]:
- File src/OFTCPSocket.m — part of check-in [c7f0229795] at 2020-01-02 01:51:34 on branch trunk — Update copyright (user: js, size: 26027) [annotate] [blame] [check-ins using]
To Artifact [6288b956d6]:
- File
src/OFTCPSocket.m
— part of check-in
[24eff635db]
at
2020-01-07 20:28:41
on branch trunk
— OFKernelEventObserver: Remove queueing of actions
This removes the ability to let a thread add or remove objects for
another thread. This features wasn't used at all, but caused significant
problems with kqueue and epoll, as this often resulted in removing a
file descriptor after it had already been closed. (user: js, size: 26610) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
220 221 222 223 224 225 226 227 228 229 230 231 | #endif } - (void)of_socketDidConnect: (OFTCPSocket *)sock exception: (id)exception { if (exception != nil) { [sock of_closeSocket]; if (_socketAddressesIndex >= _socketAddresses.count) { _exception = [exception retain]; [self didConnect]; | > > > > > > > | > > > > > > > | > > > > > > > | > | 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | #endif } - (void)of_socketDidConnect: (OFTCPSocket *)sock exception: (id)exception { if (exception != nil) { /* * self might be retained only by the pending async requests, * which we're about to cancel. */ [[self retain] autorelease]; [sock cancelAsyncRequests]; [sock of_closeSocket]; if (_socketAddressesIndex >= _socketAddresses.count) { _exception = [exception retain]; [self didConnect]; } else { /* * We must not call it before returning, as otherwise * the new socket would be removed from the queue upon * return. */ OFRunLoop *runLoop = [OFRunLoop currentRunLoop]; SEL selector = @selector(tryNextAddressWithRunLoopMode:); OFTimer *timer = [OFTimer timerWithTimeInterval: 0 target: self selector: selector object: runLoop.currentMode repeats: false]; [runLoop addTimer: timer forMode: runLoop.currentMode]; } return; } if (_SOCKS5Host != nil) [self sendSOCKS5Request]; else |
︙ | ︙ |