<!-- Please note that this template is not optional. Please fill out _ALL_ fields, or your issue may be closed as "invalid." Please do not delete this template. Please ask questions on StackOverflow or Gitter (https://gitter.im/webpack/webpack). General questions, how-to questions, and support requests will be closed. --> - Operating System: Windows 10 - Node Version: 12.8.1 - NPM Version: 6.10.3 - webpack Version: 4.39.2 - webpack-dev-server Version: since 3.5.0 - Browser: Chrome 76 <!-- Please place an x, no spaces, in all [ ] that apply Please note that we are NOT accepting FEATURE requests at this time. --> - [X] This is a **bug** - [ ] This is a **modification** request ### Expected Behavior `connection` should not be null ### Actual Behavior `TypeError: Cannot read property 'headers' of null at Server.socket.on (***/node_modules/webpack-dev-server/lib/servers/SockJSServer.js:68:32)` ### For Bugs; How can we reproduce the behavior? This bug is difficult to reproduce. It happens occasionally. https://github.com/webpack/webpack-dev-server/blob/2d44ef8088db2312516274cc2d5edda348064712/lib/servers/SockJSServer.js#L65-L69 line 67 should become ```js if (connection) { f(connection, connection.headers) } ``` ### For Features; What is the motivation and/or use-case for the feature?