I've written a multi-threaded UDP Proxy in Java using DatagramChannels.
It works fine until the following exception appears:
java.net.SocketException: Network dropped connection on reset: no further information
at sun.nio.ch.DatagramChannelImpl.receive0(Native Method)
at sun.nio.ch.DatagramChannelImpl.receiveIntoNativeBuffer(Unknown Source)
at sun.nio.ch.DatagramChannelImpl.receive(Unknown Source)
at sun.nio.ch.DatagramChannelImpl.receive(Unknown Source)
at com.fabio.rotumaster.proxy.ProxyMain.handlePacket(ProxyMain.java:189)
at com.fabio.rotumaster.proxy.ProxyMain.run(ProxyMain.java:169)
at java.lang.Thread.run(Unknown Source)
In ProxyMain.java on line 189 there is only the receive method being called:
SocketAddress sender = this.clientChannel.receive(buffer);
The error appears randomly from time to time. Sometimes only once and sometimes 5 of them in a row.
Does anyone have an idea?