1.Caused by: android.system.ErrnoException: sendto failed: EPIPE (Broken pipe)
12-26 14:18:04.501 17583-18232/com.yskj.hzfinance W/System.err: at libcore.io.Posix.sendtoBytes(Native Method)
12-26 14:18:04.501 17583-18232/com.yskj.hzfinance W/System.err: at libcore.io.Posix.sendto(Posix.java:211)
12-26 14:18:04.501 17583-18232/com.yskj.hzfinance W/System.err: at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:278)
12-26 14:18:04.501 17583-18232/com.yskj.hzfinance W/System.err: at libcore.io.IoBridge.sendto(IoBridge.java:509)
That error occurs when the client try to write to a connection when the backend has already closed it.
|
That error occurs when the client try to write to a connection when the backend has already closed it. By default Android set the
Keep Alive property to true and will reuse the old socket connections since establishing a connection is a resource consuming operation in a mobile environment (you can test it with a tool like
fiddler
). Try to set the Connection header to close or call System.setProperty("http.keepAlive", "false"); in order to disable Keep Alive and thus forcing the system to create a new connection.
setKeepAlive(boolean on);
当设置为true的时候,TCP会实现监控连接是否有效,当连接处于空闲状态的时候,超过了2个小时,本地的TCP实现会发送一个数据包给远程的socket,如果远程没有发回响应,TCP会持续尝试11分钟,知道响应为止,如果在12分钟的时候还没响应,TCP尝试关闭socket连接。
3.同名自定义权限
<!--<permission-->
<!--android:name="getui.permission.GetuiService.com.dx168.efsmobile"-->
<!--android:protectionLevel="normal"-->
<!--tools:ignore="UniquePermission" />-->
4.
为什么你的自定义View wrap_content不起作用?
5.tabLayout样式
if(adapter.getCount() <6){
tabLayout.setTabGravity(TabLayout.GRAVITY_FILL); tabLayout.setTabMode(TabLayout.MODE_FIXED); }else { tabLayout.setTabGravity(TabLayout.GRAVITY_CENTER); tabLayout.setTabMode(TabLayout.MODE_SCROLLABLE);
}
tabLayout.setupWithViewPager(viewPager);
6.tab,fragment,viewpager复杂嵌套时的显示隐藏控制
当Fragment 从隐藏切换至显示的时候,不会调用onResume(),Fragment 的onResume()是Fragment 和它的宿主在切换时才会调用的,而Fragment 之间切换时,不会调用onResume()方法,仔细查看发现Fragment 之间切换,Fragment 从隐藏切换至显示,会调用onHiddenChanged(boolean hidden)方法
|