mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Fix integer overflow breaking Lidgren metrics.
This commit is contained in:
Submodule Lidgren.Network/Lidgren.Network updated: 73554e6061...5fc11c2b2b
@@ -94,8 +94,8 @@ namespace Robust.Server
|
||||
private IGameLoop _mainLoop = default!;
|
||||
|
||||
private TimeSpan _lastTitleUpdate;
|
||||
private int _lastReceivedBytes;
|
||||
private int _lastSentBytes;
|
||||
private long _lastReceivedBytes;
|
||||
private long _lastSentBytes;
|
||||
|
||||
private string? _shutdownReason;
|
||||
|
||||
|
||||
@@ -177,10 +177,10 @@ namespace Robust.Shared.Network
|
||||
{
|
||||
get
|
||||
{
|
||||
var sentPackets = 0;
|
||||
var sentBytes = 0;
|
||||
var recvPackets = 0;
|
||||
var recvBytes = 0;
|
||||
var sentPackets = 0L;
|
||||
var sentBytes = 0L;
|
||||
var recvPackets = 0L;
|
||||
var recvBytes = 0L;
|
||||
|
||||
foreach (var peer in _netPeers)
|
||||
{
|
||||
@@ -1155,24 +1155,24 @@ namespace Robust.Shared.Network
|
||||
/// <summary>
|
||||
/// Total sent bytes.
|
||||
/// </summary>
|
||||
public readonly int SentBytes;
|
||||
public readonly long SentBytes;
|
||||
|
||||
/// <summary>
|
||||
/// Total received bytes.
|
||||
/// </summary>
|
||||
public readonly int ReceivedBytes;
|
||||
public readonly long ReceivedBytes;
|
||||
|
||||
/// <summary>
|
||||
/// Total sent packets.
|
||||
/// </summary>
|
||||
public readonly int SentPackets;
|
||||
public readonly long SentPackets;
|
||||
|
||||
/// <summary>
|
||||
/// Total received packets.
|
||||
/// </summary>
|
||||
public readonly int ReceivedPackets;
|
||||
public readonly long ReceivedPackets;
|
||||
|
||||
public NetworkStats(int sentBytes, int receivedBytes, int sentPackets, int receivedPackets)
|
||||
public NetworkStats(long sentBytes, long receivedBytes, long sentPackets, long receivedPackets)
|
||||
{
|
||||
SentBytes = sentBytes;
|
||||
ReceivedBytes = receivedBytes;
|
||||
|
||||
Reference in New Issue
Block a user