diff --git a/packages/react-dev-utils/webpackHotDevClient.js b/packages/react-dev-utils/webpackHotDevClient.js index 120b8680aad7a5dd27cfe8ef98da711e457238cb..b92a0059129083a0d9c285b64c09ec46ba1b8a29 100644 --- a/packages/react-dev-utils/webpackHotDevClient.js +++ b/packages/react-dev-utils/webpackHotDevClient.js @@ -130,9 +130,15 @@ var connection = new SockJS(url.format({ // Hardcoded in WebpackDevServer pathname: '/sockjs-node' })); -// Note: unlike WebpackDevServer's built-in client, -// we don't handle disconnect. If connection fails, -// just leave it instead of spamming the console. + +// Unlike WebpackDevServer client, we won't try to reconnect +// to avoid spamming the console. Disconnect usually happens +// when developer stops the server. +connection.onclose = function() { + console.info( + 'The development server has disconnected.\nRefresh the page if necessary.' + ); +}; // Remember some state related to hot module replacement. var isFirstCompilation = true;