mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-11 09:11:14 +08:00
[ReactNative] Fix reloading in debug mode sometimes crashes packager
This commit is contained in:
@@ -34,7 +34,12 @@ function attachToServer(server, path) {
|
||||
|
||||
ws.on('message', function(message) {
|
||||
allClientsExcept(ws).forEach(function(cn) {
|
||||
cn.send(message);
|
||||
try {
|
||||
// Sometimes this call throws 'not opened'
|
||||
cn.send(message);
|
||||
} catch(e) {
|
||||
console.warn('WARN: ' + e.message);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user