We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e872907 commit 17ab11eCopy full SHA for 17ab11e
packages/react-dev-utils/webpackHotDevClient.js
@@ -130,9 +130,15 @@ var connection = new SockJS(url.format({
130
// Hardcoded in WebpackDevServer
131
pathname: '/sockjs-node'
132
}));
133
-// Note: unlike WebpackDevServer's built-in client,
134
-// we don't handle disconnect. If connection fails,
135
-// 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
136
+// when developer stops the server.
137
+connection.onclose = function() {
138
+ console.info(
139
+ 'The development server has disconnected.\nRefresh the page if necessary.'
140
+ );
141
+};
142
143
// Remember some state related to hot module replacement.
144
var isFirstCompilation = true;
0 commit comments