tests: log "Throwing away" messages before throwing away
In case the read that follows hangs we'll get a clue as to what it was doing.
This commit is contained in:
parent
5b35dea6ef
commit
bc21c505e4
@ -670,7 +670,7 @@ sub protocolsetup {
|
||||
}
|
||||
}
|
||||
|
||||
# Perform the disconnecgt handshake with sockfilt on the secondary connection
|
||||
# Perform the disconnect handshake with sockfilt on the secondary connection
|
||||
# (the only connection we actively disconnect).
|
||||
# This involves waiting for the disconnect acknowledgment after the DISC
|
||||
# command, while throwing away anything else that might come in before
|
||||
@ -690,9 +690,8 @@ sub disc_handshake {
|
||||
$size = hex($1);
|
||||
}
|
||||
|
||||
read_datasockf(\$line, $size);
|
||||
|
||||
logmsg "> Throwing away $size bytes on closed connection\n";
|
||||
read_datasockf(\$line, $size);
|
||||
}
|
||||
elsif($line eq "DISC\n") {
|
||||
logmsg "Fancy that; client wants to DISC, too\n";
|
||||
|
||||
@ -921,11 +921,10 @@ static bool disc_handshake(void)
|
||||
}
|
||||
else if(!memcmp("DATA", buffer, 4)) {
|
||||
/* We must read more data to stay in sync */
|
||||
logmsg("Throwing away %zd data bytes", buffer_len);
|
||||
if(!read_data_block(buffer, sizeof(buffer), &buffer_len))
|
||||
return FALSE;
|
||||
|
||||
logmsg("Throwing again %zd data bytes", buffer_len);
|
||||
|
||||
}
|
||||
else if(!memcmp("QUIT", buffer, 4)) {
|
||||
/* just die */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user