mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 23:30:55 +03:00
Fixed logging of Encoder to log correct sequence number
This commit is contained in:
@@ -62,8 +62,10 @@ final class Encoder
|
||||
long encode(SSHPacket buffer) {
|
||||
encodeLock.lock();
|
||||
try {
|
||||
if (log.isTraceEnabled())
|
||||
log.trace("Encoding packet #{}: {}", seq, buffer.printHex());
|
||||
if (log.isTraceEnabled()) {
|
||||
// Add +1 to seq as we log before actually incrementing the sequence.
|
||||
log.trace("Encoding packet #{}: {}", seq + 1, buffer.printHex());
|
||||
}
|
||||
|
||||
if (usingCompression())
|
||||
compress(buffer);
|
||||
|
||||
Reference in New Issue
Block a user