silence "Failed writing data to the network" messages; silence out-of-sequence warnings if the pktSeq is 0; when the master reports it is closing, have peers restart their connection states;

pull/65/head
Bryan Biedenkapp 2 years ago
parent 34e6e1dc38
commit 59a5482473

@ -130,7 +130,7 @@ bool FrameQueue::write(const uint8_t* message, uint32_t length, uint32_t streamI
bool ret = true; bool ret = true;
if (!m_socket->write(buffer, bufferLen, addr, addrLen)) { if (!m_socket->write(buffer, bufferLen, addr, addrLen)) {
LogError(LOG_NET, "Failed writing data to the network"); // LogError(LOG_NET, "Failed writing data to the network");
ret = false; ret = false;
} }

@ -91,7 +91,7 @@ bool RawFrameQueue::write(const uint8_t* message, uint32_t length, sockaddr_stor
bool ret = true; bool ret = true;
if (!m_socket->write(buffer, length, addr, addrLen)) { if (!m_socket->write(buffer, length, addr, addrLen)) {
LogError(LOG_NET, "Failed writing data to the network"); // LogError(LOG_NET, "Failed writing data to the network");
ret = false; ret = false;
} }
@ -142,7 +142,7 @@ bool RawFrameQueue::flushQueue()
ret = true; ret = true;
if (!m_socket->write(m_buffers)) { if (!m_socket->write(m_buffers)) {
LogError(LOG_NET, "Failed writing data to the network"); // LogError(LOG_NET, "Failed writing data to the network");
ret = false; ret = false;
} }

@ -421,7 +421,7 @@ void* FNENetwork::threadedNetworkRx(void* arg)
connection->pktNextSeq(0U); connection->pktNextSeq(0U);
} }
} else { } else {
if ((connection->currStreamId() == streamId) && (pktSeq != connection->pktNextSeq()) && (pktSeq != (RTP_END_OF_CALL_SEQ - 1U))) { if ((connection->currStreamId() == streamId) && (pktSeq != connection->pktNextSeq()) && (pktSeq != (RTP_END_OF_CALL_SEQ - 1U)) && pktSeq != 0U) {
LogWarning(LOG_NET, "PEER %u (%s) stream %u out-of-sequence; %u != %u", peerId, connection->identity().c_str(), LogWarning(LOG_NET, "PEER %u (%s) stream %u out-of-sequence; %u != %u", peerId, connection->identity().c_str(),
streamId, pktSeq, connection->pktNextSeq()); streamId, pktSeq, connection->pktNextSeq());
} }

@ -583,6 +583,7 @@ void Network::clock(uint32_t ms)
case NET_FUNC::MST_CLOSING: // Master Shutdown case NET_FUNC::MST_CLOSING: // Master Shutdown
{ {
LogError(LOG_NET, "PEER %u master is closing down, remotePeerId = %u", m_peerId, m_remotePeerId); LogError(LOG_NET, "PEER %u master is closing down, remotePeerId = %u", m_peerId, m_remotePeerId);
m_status = NET_STAT_WAITING_CONNECT;
close(); close();
open(); open();
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.