Selaa lähdekoodia

be sure to flush on close

David Rose 22 vuotta sitten
vanhempi
sitoutus
9a234e0341
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      panda/src/net/connectionManager.cxx

+ 4 - 0
panda/src/net/connectionManager.cxx

@@ -234,6 +234,10 @@ open_TCP_client_connection(const string &hostname, int port,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool ConnectionManager::
 bool ConnectionManager::
 close_connection(const PT(Connection) &connection) {
 close_connection(const PT(Connection) &connection) {
+  if (connection != (Connection *)NULL) {
+    connection->flush();
+  }
+
   PR_Lock(_set_mutex);
   PR_Lock(_set_mutex);
   Connections::iterator ci = _connections.find(connection);
   Connections::iterator ci = _connections.find(connection);
   if (ci == _connections.end()) {
   if (ci == _connections.end()) {