summaryrefslogtreecommitdiff
path: root/src/network/network.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-05-20 18:54:14 +0000
committerrubidium <rubidium@openttd.org>2010-05-20 18:54:14 +0000
commit52b211f939574ac0fd3824160e4fb81291815c26 (patch)
treea7e90fb9e18058d221b422e1698ebdde0237bf04 /src/network/network.cpp
parent63a416cc599e50500a42a2b1fe57df2331a52b49 (diff)
downloadopenttd-52b211f939574ac0fd3824160e4fb81291815c26.tar.xz
(svn r19869) -Fix [FS#3819]: when a connection gets lost and a game with AIs was loaded the client might crash due to the AIs not being loaded while the game loop is executed
Diffstat (limited to 'src/network/network.cpp')
-rw-r--r--src/network/network.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp
index 533ed593a..aad7e7ae6 100644
--- a/src/network/network.cpp
+++ b/src/network/network.cpp
@@ -936,7 +936,10 @@ void NetworkDisconnect(bool blocking)
NetworkClose();
}
-/* Receives something from the network */
+/**
+ * Receives something from the network.
+ * @return true if everthing went fine, false when the connection got closed.
+ */
static bool NetworkReceive()
{
NetworkClientSocket *cs;
@@ -991,7 +994,7 @@ static bool NetworkReceive()
}
}
}
- return true;
+ return _networking;
}
/* This sends all buffered commands (if possible) */