mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
better error message when datagram too large
This commit is contained in:
parent
5181b69662
commit
f8000948e5
@ -25,6 +25,7 @@
|
|||||||
#include "config_net.h"
|
#include "config_net.h"
|
||||||
#include "config_express.h" // for collect_tcp
|
#include "config_express.h" // for collect_tcp
|
||||||
#include "clockObject.h"
|
#include "clockObject.h"
|
||||||
|
#include "notify.h"
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -392,6 +393,14 @@ send_datagram(const NetDatagram &datagram) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We might queue up TCP packets for later sending.
|
// We might queue up TCP packets for later sending.
|
||||||
|
if (datagram.get_length() >= 0x10000) {
|
||||||
|
net_cat.error()
|
||||||
|
<< "Attempt to send TCP datagram of " << datagram.get_length()
|
||||||
|
<< " bytes--too long!\n";
|
||||||
|
nassert_raise("Datagram too long");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
DatagramTCPHeader header(datagram);
|
DatagramTCPHeader header(datagram);
|
||||||
|
|
||||||
PR_Lock(_write_mutex);
|
PR_Lock(_write_mutex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user