Skip to content

Commit

Permalink
RN: Packager URL defaults to port 8081 if no port in bundleURL
Browse files Browse the repository at this point in the history
Summary:The packager url for the persistent connection relied on a port
in the bundleURL, so we need to insert a sensible default. Otherwise,
issues occur: facebook#6581

Reviewed By: bestander

Differential Revision: D3113034

fb-gh-sync-id: 4eac52631ad7abd343b75a4488bb591b5caf2145
fbshipit-source-id: 4eac52631ad7abd343b75a4488bb591b5caf2145
  • Loading branch information
bottledwalter authored and zebulgar committed Jun 18, 2016
1 parent cc47f7b commit 9b642ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions React/Modules/RCTDevMenu.m
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ - (NSURL *)packagerURL

NSString *scheme = [_bridge.bundleURL scheme];
NSNumber *port = [_bridge.bundleURL port];
if (!port) {
port = @8081; // Packager default port
}
return [NSURL URLWithString:[NSString stringWithFormat:@"%@://%@:%@/message?role=shell", scheme, host, port]];
}

Expand Down

0 comments on commit 9b642ea

Please sign in to comment.