{"action":"created","issue":{"url":"https://api.github.com/repos/kuujo/copycat/issues/20","labels_url":"https://api.github.com/repos/kuujo/copycat/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/kuujo/copycat/issues/20/comments","events_url":"https://api.github.com/repos/kuujo/copycat/issues/20/events","html_url":"https://github.com/kuujo/copycat/issues/20","id":60263226,"number":20,"title":"net.kuujo.copycat.netty.NettyTcpProtocolClient$1 is not a @Sharable handler, so can't be added or removed multiple times","user":{"login":"pizirun","id":8059174,"avatar_url":"https://avatars.githubusercontent.com/u/8059174?v=3","gravatar_id":"","url":"https://api.github.com/users/pizirun","html_url":"https://github.com/pizirun","followers_url":"https://api.github.com/users/pizirun/followers","following_url":"https://api.github.com/users/pizirun/following{/other_user}","gists_url":"https://api.github.com/users/pizirun/gists{/gist_id}","starred_url":"https://api.github.com/users/pizirun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pizirun/subscriptions","organizations_url":"https://api.github.com/users/pizirun/orgs","repos_url":"https://api.github.com/users/pizirun/repos","events_url":"https://api.github.com/users/pizirun/events{/privacy}","received_events_url":"https://api.github.com/users/pizirun/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-08T16:11:07Z","updated_at":"2015-06-19T07:48:35Z","closed_at":"2015-06-19T07:48:35Z","body":"(on master branch)\r\n2015-03-09 00:06:51,148 WARN  [io.netty.channel.ChannelInitializer] (nioEventLoopGroup-8-1:) Failed to initialize a channel. Closing: [id: 0xa96c6eff]\r\nio.netty.channel.ChannelPipelineException: net.kuujo.copycat.netty.NettyTcpProtocolClient$1 is not a @Sharable handler, so can't be added or removed multiple times.\r\n\tat io.netty.channel.DefaultChannelPipeline.checkMultiplicity(DefaultChannelPipeline.java:463)\r\n\tat io.netty.channel.DefaultChannelPipeline.addLast0(DefaultChannelPipeline.java:135)\r\n\tat io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:128)\r\n\tat io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:119)\r\n\tat net.kuujo.copycat.netty.NettyTcpProtocolClient$2.initChannel(NettyTcpProtocolClient.java:133)\r\n\tat net.kuujo.copycat.netty.NettyTcpProtocolClient$2.initChannel(NettyTcpProtocolClient.java:122)\r\n\tat io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:69)\r\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandlerContext.java:158)\r\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRegistered(AbstractChannelHandlerContext.java:144)\r\n\tat io.netty.channel.DefaultChannelPipeline.fireChannelRegistered(DefaultChannelPipeline.java:732)\r\n\tat io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:443)\r\n\tat io.netty.channel.AbstractChannel$AbstractUnsafe.access$100(AbstractChannel.java:375)\r\n\tat io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:419)\r\n\tat io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:370)\r\n\tat io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)\r\n\tat io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)\r\n\tat io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n\r\n\r\nThe sample code:\r\npublic static void main(String[] args) {\r\n        ClusterConfig cluster = new ClusterConfig()\r\n                .withProtocol(new NettyTcpProtocol())\r\n                .withLocalMember(\"tcp://192.168.9.207:5004\")\r\n                .withMembers(\"tcp://192.168.9.207:5000\", \"tcp://192.168.9.207:5001\", \"tcp://192.168.9.207:5002\"\r\n                , \"tcp://192.168.9.207:5003\", \"tcp://192.168.9.207:5004\");\r\n        \r\n        LeaderElection.create(\"election\", cluster).open().thenAccept(election -> {\r\n            election.addListener(member -> {\r\n                System.out.println(member.uri() + \" was elected leader!\");\r\n            });\r\n        });\r\n    }"},"comment":{"url":"https://api.github.com/repos/kuujo/copycat/issues/comments/113416117","html_url":"https://github.com/kuujo/copycat/issues/20#issuecomment-113416117","issue_url":"https://api.github.com/repos/kuujo/copycat/issues/20","id":113416117,"user":{"login":"kuujo","id":823318,"avatar_url":"https://avatars.githubusercontent.com/u/823318?v=3","gravatar_id":"","url":"https://api.github.com/users/kuujo","html_url":"https://github.com/kuujo","followers_url":"https://api.github.com/users/kuujo/followers","following_url":"https://api.github.com/users/kuujo/following{/other_user}","gists_url":"https://api.github.com/users/kuujo/gists{/gist_id}","starred_url":"https://api.github.com/users/kuujo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuujo/subscriptions","organizations_url":"https://api.github.com/users/kuujo/orgs","repos_url":"https://api.github.com/users/kuujo/repos","events_url":"https://api.github.com/users/kuujo/events{/privacy}","received_events_url":"https://api.github.com/users/kuujo/received_events","type":"User","site_admin":false},"created_at":"2015-06-19T07:48:35Z","updated_at":"2015-06-19T07:48:35Z","body":"The `0.6.0` branch has been merged into `master` and is significantly more stable than the previous development branch. This is no longer an issue."}}