debug: Add detailed logging for handshake sp_address
**Motivations :** - Debug why sp_address is empty in handshake message - Understand why relay readiness check fails **Modifications :** - Added detailed logging in handleHandshakeMsg to inspect sp_address - Added warning when sp_address is empty or undefined **Pages affectées :** - src/services/service.ts - Enhanced handshake debugging
This commit is contained in:
parent
bec3ab1729
commit
c21de2b943
@ -2109,10 +2109,20 @@ export default class Services {
|
|||||||
public async handleHandshakeMsg(url: string, parsedMsg: any) {
|
public async handleHandshakeMsg(url: string, parsedMsg: any) {
|
||||||
try {
|
try {
|
||||||
const handshakeMsg: HandshakeMessage = JSON.parse(parsedMsg);
|
const handshakeMsg: HandshakeMessage = JSON.parse(parsedMsg);
|
||||||
|
console.log('🔍 DEBUG: Handshake message received:', {
|
||||||
|
url,
|
||||||
|
hasSpAddress: !!handshakeMsg.sp_address,
|
||||||
|
spAddress: handshakeMsg.sp_address,
|
||||||
|
spAddressType: typeof handshakeMsg.sp_address,
|
||||||
|
spAddressLength: handshakeMsg.sp_address?.length
|
||||||
|
});
|
||||||
|
|
||||||
if (handshakeMsg.sp_address) {
|
if (handshakeMsg.sp_address) {
|
||||||
this.updateRelay(url, handshakeMsg.sp_address);
|
this.updateRelay(url, handshakeMsg.sp_address);
|
||||||
this.relayAddresses[url] = handshakeMsg.sp_address;
|
this.relayAddresses[url] = handshakeMsg.sp_address;
|
||||||
this.resolveRelayReady();
|
this.resolveRelayReady();
|
||||||
|
} else {
|
||||||
|
console.warn('⚠️ Handshake received but sp_address is empty or undefined');
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('handshakeMsg:', handshakeMsg);
|
console.log('handshakeMsg:', handshakeMsg);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user