mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 06:39:54 +01:00
Improve logging for DuplexSyncConnection
This commit is contained in:
@@ -3,7 +3,6 @@ package org.briarproject.bramble.connection;
|
|||||||
import org.briarproject.bramble.api.connection.ConnectionRegistry;
|
import org.briarproject.bramble.api.connection.ConnectionRegistry;
|
||||||
import org.briarproject.bramble.api.contact.ContactId;
|
import org.briarproject.bramble.api.contact.ContactId;
|
||||||
import org.briarproject.bramble.api.contact.HandshakeManager;
|
import org.briarproject.bramble.api.contact.HandshakeManager;
|
||||||
import org.briarproject.bramble.api.contact.PendingContactId;
|
|
||||||
import org.briarproject.bramble.api.db.DbException;
|
import org.briarproject.bramble.api.db.DbException;
|
||||||
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
|
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
|
||||||
import org.briarproject.bramble.api.plugin.TransportId;
|
import org.briarproject.bramble.api.plugin.TransportId;
|
||||||
@@ -50,7 +49,8 @@ class IncomingDuplexSyncConnection extends DuplexSyncConnection
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
LOG.info("Running IncomingDuplexSyncConnection");
|
LOG.info("Running IncomingDuplexSyncConnection on transport " +
|
||||||
|
transportId.getString());
|
||||||
// Read and recognise the tag
|
// Read and recognise the tag
|
||||||
StreamContext ctx = recogniseTag(reader, transportId);
|
StreamContext ctx = recogniseTag(reader, transportId);
|
||||||
if (ctx == null) {
|
if (ctx == null) {
|
||||||
@@ -65,10 +65,10 @@ class IncomingDuplexSyncConnection extends DuplexSyncConnection
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ctx.isHandshakeMode()) {
|
if (ctx.isHandshakeMode()) {
|
||||||
if (!performHandshake(ctx, contactId)) {
|
if (!performHandshake(ctx, contactId)) {
|
||||||
LOG.warning("Handshake failed");
|
LOG.warning("Handshake failed");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Allocate a rotation mode stream context
|
// Allocate a rotation mode stream context
|
||||||
ctx = allocateStreamContext(contactId, transportId);
|
ctx = allocateStreamContext(contactId, transportId);
|
||||||
if (ctx == null) {
|
if (ctx == null) {
|
||||||
|
|||||||
@@ -61,7 +61,8 @@ class OutgoingDuplexSyncConnection extends DuplexSyncConnection
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
LOG.info("Running OutgoingDuplexSyncConnection");
|
LOG.info("Running OutgoingDuplexSyncConnection on transport " +
|
||||||
|
transportId.getString());
|
||||||
// Allocate a stream context
|
// Allocate a stream context
|
||||||
StreamContext ctx = allocateStreamContext(contactId, transportId);
|
StreamContext ctx = allocateStreamContext(contactId, transportId);
|
||||||
if (ctx == null) {
|
if (ctx == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user