summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-02-25 17:00:59 +0000
committerrubidium <rubidium@openttd.org>2009-02-25 17:00:59 +0000
commit0d12c46b5ecfc3b98f02188579663c79dbcbac5a (patch)
tree6b96ef2c34b98e291405efdb60866bf72f4e747c /src/network
parenta9dd6dc2f595bf8ed3ddfb2949b3e93e0cdfa66d (diff)
downloadopenttd-0d12c46b5ecfc3b98f02188579663c79dbcbac5a.tar.xz
(svn r15580) -Fix [FS#2684]: last activity time not properly updated causing downloads to be aborted after a minute.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_content.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp
index e6d1781cb..83740c81c 100644
--- a/src/network/network_content.cpp
+++ b/src/network/network_content.cpp
@@ -505,7 +505,11 @@ void ClientNetworkContentSocketHandler::SendReceive()
#else
WaitSelect(FD_SETSIZE, &read_fd, &write_fd, NULL, &tv, NULL);
#endif
- if (FD_ISSET(this->sock, &read_fd)) this->Recv_Packets();
+ if (FD_ISSET(this->sock, &read_fd)) {
+ this->Recv_Packets();
+ this->lastActivity = _realtime_tick;
+ }
+
this->writable = !!FD_ISSET(this->sock, &write_fd);
this->Send_Packets();
}