diff --git a/panda/src/pstatclient/pStatClient.cxx b/panda/src/pstatclient/pStatClient.cxx index 6222751a24..25970e5351 100644 --- a/panda/src/pstatclient/pStatClient.cxx +++ b/panda/src/pstatclient/pStatClient.cxx @@ -451,6 +451,9 @@ client_connect(string hostname, int port) { << port << "\n"; return false; } + // Make sure we're not queuing up multiple TCP sockets--we expect + // immediate writes of our TCP datagrams. + _tcp_connection->set_collect_tcp(false); _reader.add_connection(_tcp_connection); _is_connected = true; diff --git a/pandatool/src/pstatserver/pStatListener.cxx b/pandatool/src/pstatserver/pStatListener.cxx index e54afb048f..f9a8bda49a 100644 --- a/pandatool/src/pstatserver/pStatListener.cxx +++ b/pandatool/src/pstatserver/pStatListener.cxx @@ -50,6 +50,10 @@ connection_opened(const PT(Connection) &, nout << "Got new connection from " << address << "\n"; + // Make sure this connection doesn't queue up TCP packets we write + // to it. + new_connection->set_collect_tcp(false); + PStatReader *reader = new PStatReader(_manager, monitor); _manager->add_reader(new_connection, reader); reader->set_tcp_connection(new_connection);