Skip to content

Instantly share code, notes, and snippets.

@Qata
Last active March 4, 2016 00:33
Show Gist options
  • Save Qata/a62411156262c2b01fb6 to your computer and use it in GitHub Desktop.
Save Qata/a62411156262c2b01fb6 to your computer and use it in GitHub Desktop.
[[[[self.gateways takeUntil:[[RACSignal empty] delay:timeout]] filter:^BOOL(NSDictionary *object) {
return [object[kMACAddressAccessor] caseInsensitiveCompare:mac] == NSOrderedSame;
}] concat:[RACSignal error:[NSError errorWithDomain:RPCErrorDomain code:ERROR_TIMEOUT userInfo:@{NSLocalizedDescriptionKey:@"Timed out while waiting for a response"}]]] take:1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment