Description
Discussion at http://jgroups.1086181.n5.nabble.com/jgroups-users-PLEASE-HELP-ME-OUT-FOR-quot-JGroup-with-Android-quot-problem-td9537i20.html:
Hi, Belaban..I think I have found the problem...after discovering this issue occurs only on all ICS devices I have and after reading through the "Android issue #24748 DatagramPacket truncated UDP" at http://code.google.com/p/android/issues/detail?id=24748, I have introduced the following modification at org.jgroups.protocols.UDP.java:
public void run() {
final byte receive_buf[]=new byte[66000]; // to be on the safe side (IPv6 == 65575 bytes, IPv4 = 65535)
final DatagramPacket packet=new DatagramPacket(receive_buf, receive_buf.length);
while(thread != null && Thread.currentThread().equals(thread)) {
try
catch(SocketException sock_ex)
{ ... }catch(Throwable ex) { ... }
}
...
}
It seems to solve the EOFException but I am not sure the real impact on Jgroups library as a whole.