Skip to content

Commit

Permalink
Merge pull request #22 from instil/master
Browse files Browse the repository at this point in the history
HTTP server was being started multiple times
  • Loading branch information
MichaelBuckley committed May 7, 2014
2 parents ecbe77f + e28415f commit 6ed538a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/FrankLoader.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
@implementation FrankLoader

+ (void)applicationDidBecomeActive:(NSNotification *)notification{
static dispatch_once_t frankDidBecomeActiveToken;
#if TARGET_OS_IPHONE
FrankServer *server = [[FrankServer alloc] initWithDefaultBundle];
[server startServer];

dispatch_once(&frankDidBecomeActiveToken, ^{
FrankServer *server = [[FrankServer alloc] initWithDefaultBundle];
[server startServer];
});
#else
static dispatch_once_t frankDidBecomeActiveToken;

dispatch_once(&frankDidBecomeActiveToken, ^{
FrankServer *server = [[FrankServer alloc] initWithDefaultBundle];
[server startServer];
Expand Down

0 comments on commit 6ed538a

Please sign in to comment.