summaryrefslogtreecommitdiff
path: root/src
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
commit3ae9851bd8099f76e674beb889ae0fa460c5c2a0 (patch)
tree6b96ef2c34b98e291405efdb60866bf72f4e747c /src
parent1ad50ce4e6ed74c8eeb89a1f2780e6ed58a72b2b (diff)
downloadopenttd-3ae9851bd8099f76e674beb889ae0fa460c5c2a0.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')
-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();
}