more debug info for srt

This commit is contained in:
xiongguangjie 2022-06-22 18:41:51 +08:00
parent dea848610a
commit 5162cf6112

View File

@ -86,6 +86,7 @@ void SrtTransport::inputSockData(uint8_t *buf, int len, struct sockaddr_storage
handleDataPacket(buf, len, addr); handleDataPacket(buf, len, addr);
} else { } else {
WarnL<<"DataPacket switch to other transport: "<<socketId;
switchToOtherTransport(buf, len, socketId, addr); switchToOtherTransport(buf, len, socketId, addr);
} }
} else { } else {
@ -94,6 +95,7 @@ void SrtTransport::inputSockData(uint8_t *buf, int len, struct sockaddr_storage
uint16_t type = ControlPacket::getControlType(buf, len); uint16_t type = ControlPacket::getControlType(buf, len);
if (type != ControlPacket::HANDSHAKE && socketId != _socket_id && _socket_id != 0) { if (type != ControlPacket::HANDSHAKE && socketId != _socket_id && _socket_id != 0) {
// socket id not same // socket id not same
WarnL<<"ControlPacket: "<< (int)type <<" switch to other transport: "<<socketId;
switchToOtherTransport(buf, len, socketId, addr); switchToOtherTransport(buf, len, socketId, addr);
return; return;
} }