From dfcc3250cf38d3b7af5276e49f214880b8d20b86 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Wed, 24 Oct 2018 04:17:01 -0500 Subject: [PATCH] Changed index increment placement Seems to solve #454 on my machine --- DS4Windows/DS4Control/UdpServer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/DS4Control/UdpServer.cs b/DS4Windows/DS4Control/UdpServer.cs index c216c46..a979715 100644 --- a/DS4Windows/DS4Control/UdpServer.cs +++ b/DS4Windows/DS4Control/UdpServer.cs @@ -183,9 +183,9 @@ namespace DS4Windows //try { udpSock.SendTo(packetData, clientEP); } SocketAsyncEventArgs args = argsList[listInd]; + listInd = ++listInd % 20; args.RemoteEndPoint = clientEP; args.SetBuffer(packetData, 0, packetData.Length); - listInd = ++listInd % 20; try { udpSock.SendToAsync(args); } @@ -643,9 +643,9 @@ namespace DS4Windows { //try { udpSock.SendTo(outputData, cl); } SocketAsyncEventArgs args = argsList[listInd]; + listInd = ++listInd % 20; args.RemoteEndPoint = cl; args.SetBuffer(outputData, 0, outputData.Length); - listInd = ++listInd % 20; try { udpSock.SendToAsync(args); }