title: Spring websocket EOFException
body: <p>My project is using spring-boot web socket and embedded tomcat to implement chat server. Everything is ok but sometimes I got EOFException, and then the client cannot send a message to chat server until I restart tomcat then everything worked ok. I don't know when EOFException will happen. Pls help me</p>
  
  <blockquote>
    <p>[TRACE] 2017-10-23 06:17:10.707 [http-nio-7755-exec-4]
    NativeWebSocketSession - Sending TextMessage payload=[{"result":..],
    byteCount=164, last=true], StandardWebSocketSession[id=42b, uri=/chat]
    [DEBUG] 2017-10-23 06:17:29.670 [http-nio-7755-exec-8]
    LoggingWebSocketHandlerDecorator - Transport error in
    StandardWebSocketSession[id=42b, uri=/chat] java.io.EOFException: null
      at
    org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1242)
    ~[tomcat-embed-core-8.5.16.jar!/:8.5.16]  at
    org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1182)
    ~[tomcat-embed-core-8.5.16.jar!/:8.5.16]  at
    org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:72)
    ~[tomcat-embed-websocket-8.5.16.jar!/:8.5.16]     at
    org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:171)
    ~[tomcat-embed-websocket-8.5.16.jar!/:8.5.16]     at
    org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:151)
    ~[tomcat-embed-websocket-8.5.16.jar!/:8.5.16]     at
    org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
    [tomcat-embed-websocket-8.5.16.jar!/:8.5.16]  at
    org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
    [tomcat-embed-core-8.5.16.jar!/:8.5.16]   at
    org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
    [tomcat-embed-core-8.5.16.jar!/:8.5.16]   at
    org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
    [tomcat-embed-core-8.5.16.jar!/:8.5.16]   at
    org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
    [tomcat-embed-core-8.5.16.jar!/:8.5.16]   at
    org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    [tomcat-embed-core-8.5.16.jar!/:8.5.16]   at
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    [?:1.8.0_131]     at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    [?:1.8.0_131]     at
    org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    [tomcat-embed-core-8.5.16.jar!/:8.5.16]   at
    java.lang.Thread.run(Thread.java:748) [?:1.8.0_131] [DEBUG] 2017-10-23
    06:17:29.671 [http-nio-7755-exec-8] LoggingWebSocketHandlerDecorator -
    StandardWebSocketSession[id=42b, uri=/chat] closed with
    CloseStatus[code=1006, reason=null]</p>
  </blockquote>