mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 21:03:09 +02:00
fix packet receiver cleanup
This commit is contained in:
parent
8f8845d78d
commit
3cba3d0dcd
3 changed files with 1 additions and 7 deletions
|
@ -107,10 +107,6 @@ LimitedNodeList::LimitedNodeList(unsigned short socketListenPort, unsigned short
|
|||
_packetReceiver.registerListener(PacketType::StunResponse, this, "processSTUNResponse");
|
||||
}
|
||||
|
||||
LimitedNodeList::~LimitedNodeList() {
|
||||
disconnect(&_nodeSocket, &QUdpSocket::readyRead, 0, 0);
|
||||
}
|
||||
|
||||
void LimitedNodeList::setSessionUUID(const QUuid& sessionUUID) {
|
||||
QUuid oldUUID = _sessionUUID;
|
||||
_sessionUUID = sessionUUID;
|
||||
|
|
|
@ -248,8 +248,6 @@ protected:
|
|||
LimitedNodeList(LimitedNodeList const&); // Don't implement, needed to avoid copies of singleton
|
||||
void operator=(LimitedNodeList const&); // Don't implement, needed to avoid copies of singleton
|
||||
|
||||
~LimitedNodeList();
|
||||
|
||||
qint64 writePacket(const NLPacket& packet, const HifiSockAddr& destinationSockAddr,
|
||||
const QUuid& connectionSecret = QUuid());
|
||||
qint64 writeDatagram(const QByteArray& datagram, const HifiSockAddr& destinationSockAddr);
|
||||
|
|
|
@ -182,7 +182,7 @@ void PacketReceiver::processDatagrams() {
|
|||
|
||||
auto nodeList = DependencyManager::get<LimitedNodeList>();
|
||||
|
||||
while (nodeList->getNodeSocket().hasPendingDatagrams()) {
|
||||
while (nodeList && nodeList->getNodeSocket().hasPendingDatagrams()) {
|
||||
// setup a buffer to read the packet into
|
||||
int packetSizeWithHeader = nodeList->getNodeSocket().pendingDatagramSize();
|
||||
std::unique_ptr<char> buffer = std::unique_ptr<char>(new char[packetSizeWithHeader]);
|
||||
|
|
Loading…
Reference in a new issue