{"action":"opened","issue":{"url":"https://api.github.com/repos/playframework/playframework/issues/4637","labels_url":"https://api.github.com/repos/playframework/playframework/issues/4637/labels{/name}","comments_url":"https://api.github.com/repos/playframework/playframework/issues/4637/comments","events_url":"https://api.github.com/repos/playframework/playframework/issues/4637/events","html_url":"https://github.com/playframework/playframework/issues/4637","id":86814995,"number":4637,"title":"[2.4] exception thrown when stopping web socket handling actor","user":{"login":"jiunjiunma","id":742841,"avatar_url":"https://avatars.githubusercontent.com/u/742841?v=3","gravatar_id":"","url":"https://api.github.com/users/jiunjiunma","html_url":"https://github.com/jiunjiunma","followers_url":"https://api.github.com/users/jiunjiunma/followers","following_url":"https://api.github.com/users/jiunjiunma/following{/other_user}","gists_url":"https://api.github.com/users/jiunjiunma/gists{/gist_id}","starred_url":"https://api.github.com/users/jiunjiunma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiunjiunma/subscriptions","organizations_url":"https://api.github.com/users/jiunjiunma/orgs","repos_url":"https://api.github.com/users/jiunjiunma/repos","events_url":"https://api.github.com/users/jiunjiunma/events{/privacy}","received_events_url":"https://api.github.com/users/jiunjiunma/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-10T03:04:04Z","updated_at":"2015-06-10T03:04:04Z","closed_at":null,"body":"We were trying to migrate our play 2.3 app to play 2.4. We were using an actor to handle the websocket events as in https://www.playframework.com/documentation/2.4.x/ScalaWebSockets. The code worked fine in 2.3. However, when we used play 2.4, we got annoying netty exception when the actor sends a PoisonPill to itself to close the websocket. Since this is a normal operation, we shouldn't be seeing this exception. It's very annoying and triggered unnecessary alert from our log monitoring tool. \r\n\r\njava.nio.channels.ClosedChannelException\r\n\tat sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:265)\r\n\tat sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:456)\r\n\tat org.jboss.netty.channel.socket.nio.SocketSendBufferPool$UnpooledSendBuffer.transferTo(SocketSendBufferPool.java:203)\r\n\tat org.jboss.netty.channel.socket.nio.AbstractNioWorker.write0(AbstractNioWorker.java:201)\r\n\tat org.jboss.netty.channel.socket.nio.AbstractNioWorker.writeFromUserCode(AbstractNioWorker.java:146)\r\n\tat org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleAcceptedSocket(NioServerSocketPipelineSink.java:99)\r\n\tat org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:36)\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:779)\r\n\tat org.jboss.netty.channel.Channels.write(Channels.java:725)\r\n\tat org.jboss.netty.handler.codec.oneone.OneToOneEncoder.doEncode(OneToOneEncoder.java:71)\r\n\tat org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:59)\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:784)\r\n\tat org.jboss.netty.channel.SimpleChannelHandler.writeRequested(SimpleChannelHandler.java:292)\r\n\tat org.jboss.netty.channel.SimpleChannelHandler.handleDownstream(SimpleChannelHandler.java:254)\r\n\tat com.typesafe.netty.http.pipelining.HttpPipeliningHandler.handleDownstream(HttpPipeliningHandler.java:106)\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:582)\r\n\tat org.jboss.netty.channel.Channels.write(Channels.java:704)\r\n\tat org.jboss.netty.channel.Channels.write(Channels.java:671)\r\nat org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:348)\r\n\tat play.core.server.netty.WebSocketHandler$$anon$1.closeWebSocket(WebSocketHandler.scala:140)\r\n\tat play.core.server.netty.WebSocketHandler$$anon$1.messageReceived(WebSocketHandler.scala:107)\r\n\tat org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)\r\n\tat com.typesafe.netty.http.pipelining.HttpPipeliningHandler.messageReceived(HttpPipeliningHandler.java:64)\r\n\tat org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:88)\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)\r\n\tat org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:138)\r\nat org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)\r\n\tat org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)\r\n\tat org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)\r\n\tat org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:536)\r\n\tat org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435)\r\n\tat org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)\r\nat org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)\r\n\tat org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)\r\n\tat org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)\r\n\tat org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)\r\n\tat org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)\r\n\tat org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)\r\n\tat org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)\r\n\tat org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)\r\n\tat org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)\r\n\tat org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)"}}