{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty/issues/6202","repository_url":"https://api.github.com/repos/netty/netty","labels_url":"https://api.github.com/repos/netty/netty/issues/6202/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/6202/comments","events_url":"https://api.github.com/repos/netty/netty/issues/6202/events","html_url":"https://github.com/netty/netty/issues/6202","id":200042426,"number":6202,"title":"use ssl protocol send file  failed","user":{"login":"mrsWangxing","id":8254733,"avatar_url":"https://avatars.githubusercontent.com/u/8254733?v=3","gravatar_id":"","url":"https://api.github.com/users/mrsWangxing","html_url":"https://github.com/mrsWangxing","followers_url":"https://api.github.com/users/mrsWangxing/followers","following_url":"https://api.github.com/users/mrsWangxing/following{/other_user}","gists_url":"https://api.github.com/users/mrsWangxing/gists{/gist_id}","starred_url":"https://api.github.com/users/mrsWangxing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrsWangxing/subscriptions","organizations_url":"https://api.github.com/users/mrsWangxing/orgs","repos_url":"https://api.github.com/users/mrsWangxing/repos","events_url":"https://api.github.com/users/mrsWangxing/events{/privacy}","received_events_url":"https://api.github.com/users/mrsWangxing/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-01-11T09:29:12Z","updated_at":"2017-01-13T07:44:12Z","closed_at":"2017-01-13T02:28:54Z","body":"I write 2 demo test netty ssl.\r\nThe first demo, I didn't use the SSL protocol.The second demo I use the SSL protocol.\r\nthis is the client code.Send the file to the server\r\n\r\n\r\nThis is my handler:\r\n```\r\n public void channelActive(ChannelHandlerContext ctx) throws Exception {\r\n        //Globle.channel = ctx;\r\n    \t//Thread.sleep(10000);                                (1)\r\n    \tSystem.out.println(ctx.channel().toString());\r\n        System.out.println(ctx.channel().localAddress() + \"channelActive\"+'-'+ new Date());\r\n        System.out.println(\"start\" + new Date());\r\n        String fileUrl = \"C:/work/setup/ubuntu-14.04.4-desktop-amd64.iso\";\r\n        FileControl fileControl = new FileControl(ctx);\r\n        fileControl.sendNotice();\r\n        fileControl.sendFile(fileUrl);\r\n        System.out.println(\"end\" + new Date());\r\n    }\r\n```\r\n```\r\npublic void sendFile(String fileUrl) {\r\n        // 开始执行\r\n        RandomAccessFile raf = null;\r\n        try {\r\n            raf = new RandomAccessFile(fileUrl, \"rw\");\r\n            ChunkedFile chunkedFile = new ChunkedFile(raf);\r\n            channel.writeAndFlush(chunkedFile).addListener(new ChannelFutureListener() {\r\n                @Override\r\n                public void operationComplete(ChannelFuture future) throws Exception {\r\n                    future.channel().close();\r\n                }\r\n            });\r\n        } catch (Exception e) {\r\n            e.printStackTrace();\r\n        }\r\n    }\r\n```\r\nWhen I use the SSL protocol ,I found that sending a large file to server.The server receives the file handler will only trigger channelActive and channelInactive without triggering channelRead events\r\nIf I send a small file，it is OK. \r\nBut If (1) location using 10 seconds delay, send a small file will fail\r\n\r\n### Netty version\r\nnetty-all-5.0.0.Alpha1.jar\r\n### JVM version (e.g. `java -version`)\r\njdk1.7.0_67\r\n"},"comment":{"url":"https://api.github.com/repos/netty/netty/issues/comments/272380939","html_url":"https://github.com/netty/netty/issues/6202#issuecomment-272380939","issue_url":"https://api.github.com/repos/netty/netty/issues/6202","id":272380939,"user":{"login":"mrsWangxing","id":8254733,"avatar_url":"https://avatars.githubusercontent.com/u/8254733?v=3","gravatar_id":"","url":"https://api.github.com/users/mrsWangxing","html_url":"https://github.com/mrsWangxing","followers_url":"https://api.github.com/users/mrsWangxing/followers","following_url":"https://api.github.com/users/mrsWangxing/following{/other_user}","gists_url":"https://api.github.com/users/mrsWangxing/gists{/gist_id}","starred_url":"https://api.github.com/users/mrsWangxing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrsWangxing/subscriptions","organizations_url":"https://api.github.com/users/mrsWangxing/orgs","repos_url":"https://api.github.com/users/mrsWangxing/repos","events_url":"https://api.github.com/users/mrsWangxing/events{/privacy}","received_events_url":"https://api.github.com/users/mrsWangxing/received_events","type":"User","site_admin":false},"created_at":"2017-01-13T07:44:12Z","updated_at":"2017-01-13T07:44:12Z","body":"If you have time,  you can look at my demo. thanks.\r\nhttps://github.com/mrsWangxing/netty-ssl-send-large-file/tree/master is my test demo"}}
{"actor":{"display_login":"mrsWangxing"}}