diff --git a/android/src/main/java/com/tradle/react/UdpSocketClient.java b/android/src/main/java/com/tradle/react/UdpSocketClient.java index 177d166..881dff5 100644 --- a/android/src/main/java/com/tradle/react/UdpSocketClient.java +++ b/android/src/main/java/com/tradle/react/UdpSocketClient.java @@ -107,6 +107,8 @@ public final class UdpSocketClient implements UdpReceiverTask.OnDataReceivedList mReceiverTask.cancel(true); } + mReceiverTask = new UdpReceiverTask(); + // tear down the DatagramSocket, and rebuild as a MulticastSocket final int port = mSocket.getLocalPort(); mSocket.close();