summaryrefslogtreecommitdiff
path: root/src/network/network_server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/network_server.cpp')
-rw-r--r--src/network/network_server.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index 9b77a57af..5301bd084 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -247,7 +247,7 @@ Packet *ServerNetworkGameSocketHandler::ReceivePacket()
/* We can receive a packet, so try that and if needed account for
* the amount of received data. */
Packet *p = this->NetworkTCPSocketHandler::ReceivePacket();
- if (p != nullptr) this->receive_limit -= p->size;
+ if (p != nullptr) this->receive_limit -= p->Size();
return p;
}
@@ -1832,7 +1832,7 @@ void NetworkServer_Tick(bool send_frame)
for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) {
/* We allow a number of bytes per frame, but only to the burst amount
* to be available for packet receiving at any particular time. */
- cs->receive_limit = std::min<int>(cs->receive_limit + _settings_client.network.bytes_per_frame,
+ cs->receive_limit = std::min<size_t>(cs->receive_limit + _settings_client.network.bytes_per_frame,
_settings_client.network.bytes_per_frame_burst);
/* Check if the speed of the client is what we can expect from a client */