Merge pull request #1326 from realm/ap/rn48_fix

Fix port conflict between RN >= 0.48 and RPC server (#1294)
This commit is contained in:
Ashwin Phatak 2017-09-20 14:05:42 +05:30 committed by GitHub
commit 7099b9f485
4 changed files with 18 additions and 6 deletions

View File

@ -1,3 +1,15 @@
X.Y.Z Release notes
=============================================================
### Breaking changes
* None
### Enhancements
* None
### Bug fixes
* Fixed port conflict between RN >= 0.48 inspector proxy and RPC server used for Chrome debugging (#1294).
1.12.0 Release notes (2017-9-14)
=============================================================
### Breaking changes

View File

@ -22,17 +22,17 @@ apply plugin: 'com.android.library'
task forwardDebugPort(type: Exec) {
def adb = android.getAdbExe()?.toString() ?: 'false'
commandLine adb, 'forward', 'tcp:8082', 'tcp:8082'
commandLine adb, 'forward', 'tcp:8083', 'tcp:8083'
ignoreExitValue true
doLast {
if (execResult.getExitValue() != 0) {
logger.error(
'===========================================================================\n' +
'WARNING: Failed to automatically forward port 8082.\n' +
'In order to use Realm in Chrome debugging mode, port 8082 must be forwarded\n' +
'WARNING: Failed to automatically forward port 8083.\n' +
'In order to use Realm in Chrome debugging mode, port 8083 must be forwarded\n' +
'from localhost to the device or emulator being used to run the application.\n' +
'You may need to add the appropriate flags to the command that failed:\n' +
' adb forward tcp:8082 tcp:8082\n' +
' adb forward tcp:8083 tcp:8083\n' +
'===========================================================================\n'
)
}

View File

@ -23,7 +23,7 @@ import java.util.Map;
import fi.iki.elonen.NanoHTTPD;
class RealmReactModule extends ReactContextBaseJavaModule {
private static final int DEFAULT_PORT = 8082;
private static final int DEFAULT_PORT = 8083;
private static boolean sentAnalytics = false;
private AndroidWebServer webServer;

View File

@ -38,7 +38,7 @@
#import "GCDWebServerErrorResponse.h"
#import "rpc.hpp"
#define WEB_SERVER_PORT 8082
#define WEB_SERVER_PORT 8083
using namespace realm::rpc;
#endif