Преглед на файлове

local network: code simplification

(cherry picked from commit 8bd2da2d1b2e1a593ef609913fd9c21bed999c66)
Felix Paul Kühne преди 10 години
родител
ревизия
48b7e9be06
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      Sources/VLCLocalServerListViewController.m

+ 2 - 2
Sources/VLCLocalServerListViewController.m

@@ -245,8 +245,8 @@
     //Search for UPnP Devices
     [[managerInstance SSDP] startSSDP];
     [[managerInstance SSDP] notifySSDPAlive];
-    _searchTimer = [NSTimer timerWithTimeInterval:10.0 target:self selector:@selector(_performSSDPSearch) userInfo:nil repeats:YES];
-    [_searchTimer setFireDate:[NSDate dateWithTimeIntervalSinceNow:1.0]];
+
+    _searchTimer = [[NSTimer alloc] initWithFireDate:[NSDate dateWithTimeIntervalSinceNow:1.0] interval:10.0 target:self selector:@selector(_performSSDPSearch) userInfo:nil repeats:YES];
     [[NSRunLoop mainRunLoop] addTimer:_searchTimer forMode:NSRunLoopCommonModes];
     _udnpDiscoveryRunning = YES;
 }