Skip to content

Commit

Permalink
Rare crash fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DataNext27 committed Mar 26, 2024
1 parent 9849a24 commit 293e918
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions TPSteelSeriesGG.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Octokit" Version="9.1.1" />
<PackageReference Include="Octokit" Version="10.0.0" />
<PackageReference Include="PacketDotNet" Version="1.4.8-pre18" />
<PackageReference Include="SharpPcap" Version="6.2.5" />
<PackageReference Include="SharpPcap" Version="6.3.0" />
<PackageReference Include="TouchPortal-CS-API" Version="1.46.0" />
</ItemGroup>

Expand Down
4 changes: 4 additions & 0 deletions TPSteelSeriesGG.sln.DotSettings.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/Environment/AssemblyExplorer/XmlDocument/@EntryValue">&lt;AssemblyExplorer&gt;&#xD;
&lt;Assembly Path="C:\Users\Aurel\.nuget\packages\packetdotnet\1.4.8-pre18\lib\net7.0\PacketDotNet.dll" /&gt;&#xD;
&lt;/AssemblyExplorer&gt;</s:String></wpf:ResourceDictionary>
11 changes: 8 additions & 3 deletions src/SteelSeriesAPI/SteelSeriesHTTPHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,15 @@ public static void StartSteelSeriesListener()
// Ouvrir l'interface de bouclage pour la capture
loopbackDevice.OnPacketArrival += (object s, PacketCapture e) =>
{
var rawPacket = e.GetPacket();
if (rawPacket.Data.Length <= 0)
RawCapture rawPacket;
try
{
return;
rawPacket = e.GetPacket();
}
catch (ArgumentException exception)
{
Console.WriteLine(exception);
throw;
}

Packet packet = Packet.ParsePacket(rawPacket.LinkLayerType, rawPacket.Data);
Expand Down

0 comments on commit 293e918

Please sign in to comment.