Show warning instead of error on duplicate connection
Summary: Show warning instead of error on duplicate connection Reviewed By: alexeylang Differential Revision: D9117286 fbshipit-source-id: 81b135584bb3f44e37388de6df9d6386e5fb758a
This commit is contained in:
parent
1fb7a25f7b
commit
1b65c6d73a
|
@ -95,9 +95,11 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
|||
- (void)handleConnect:(NSDictionary *)payload
|
||||
{
|
||||
NSString *pageId = payload[@"pageId"];
|
||||
if (_inspectorConnections[pageId]) {
|
||||
RCTInspectorLocalConnection *existingConnection = _inspectorConnections[pageId];
|
||||
if (existingConnection) {
|
||||
[_inspectorConnections removeObjectForKey:pageId];
|
||||
RCTLogError(@"Already connected: %@", pageId);
|
||||
[existingConnection disconnect];
|
||||
RCTLogWarn(@"Already connected: %@", pageId);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue