mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
allow re-handshake in NodeList after domain refresh
This commit is contained in:
parent
c015fdd212
commit
45d796e8f3
5 changed files with 6 additions and 3 deletions
|
@ -652,7 +652,6 @@ void DomainServer::readAvailableDTLSDatagrams() {
|
|||
DTLSServerSession* existingSession = _dtlsSessions.value(senderHifiSockAddr);
|
||||
|
||||
if (existingSession) {
|
||||
qDebug() << "There is an existing session for" << senderHifiSockAddr;
|
||||
if (!existingSession->completedHandshake()) {
|
||||
// check if we have completed handshake with this user
|
||||
int handshakeReturn = gnutls_handshake(*existingSession->getGnuTLSSession());
|
||||
|
|
|
@ -61,6 +61,7 @@ signals:
|
|||
void hostnameChanged(const QString& hostname);
|
||||
void connectedToDomain(const QString& hostname);
|
||||
void completedDTLSHandshake();
|
||||
void DTLSConnectionLost();
|
||||
|
||||
private:
|
||||
void reset();
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include "HifiSockAddr.h"
|
||||
|
||||
#define DTLS_VERBOSE_DEBUG 1
|
||||
#define DTLS_VERBOSE_DEBUG 0
|
||||
|
||||
class DummyDTLSSession : public QObject {
|
||||
Q_OBJECT
|
||||
|
|
|
@ -426,7 +426,7 @@ void LimitedNodeList::removeSilentNodes() {
|
|||
|
||||
node->getMutex().lock();
|
||||
|
||||
if ((usecTimestampNow() - node->getLastHeardMicrostamp()) > (NODE_SILENCE_THRESHOLD_MSECS * 1)) {
|
||||
if ((usecTimestampNow() - node->getLastHeardMicrostamp()) > (NODE_SILENCE_THRESHOLD_MSECS * 1000)) {
|
||||
// call our private method to kill this node (removes it and emits the right signal)
|
||||
nodeItem = killNodeAtHashIterator(nodeItem);
|
||||
} else {
|
||||
|
|
|
@ -196,6 +196,9 @@ void NodeList::reset() {
|
|||
|
||||
// clear the domain connection information
|
||||
_domainHandler.clearConnectionInfo();
|
||||
|
||||
// also disconnect from the DTLS socket readyRead() so it can handle handshaking
|
||||
disconnect(_dtlsSocket, 0, this, 0);
|
||||
}
|
||||
|
||||
void NodeList::addNodeTypeToInterestSet(NodeType_t nodeTypeToAdd) {
|
||||
|
|
Loading…
Reference in a new issue