Bluesky app fork with some witchin' additions 💫 witchsky.app
bluesky fork client

Fix webpack dev server freezing after repeated refreshes (#9865)

authored by samuel.fm and committed by

GitHub c906fea7 775a041b

+9
+9
webpack.config.js
··· 36 36 ] 37 37 if (env.mode === 'development') { 38 38 config.plugins.push(new ReactRefreshWebpackPlugin()) 39 + // Reap zombie HMR WebSocket connections that linger after refresh. 40 + // Without this, dead sockets exhaust the browser's per-origin connection 41 + // pool and the dev server stops responding. 42 + config.devServer.onListening = devServer => { 43 + devServer.server.on('connection', socket => { 44 + socket.setTimeout(10000) 45 + socket.on('timeout', () => socket.destroy()) 46 + }) 47 + } 39 48 } else { 40 49 // Support static CDN for chunks 41 50 config.output.publicPath = 'auto'