mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Use new method to get stream context in handshake mode on incoming duplex sync connection
This commit is contained in:
@@ -130,13 +130,17 @@ class IncomingDuplexSyncConnection extends DuplexSyncConnection
|
|||||||
private boolean performHandshake(StreamContext ctxIn, ContactId contactId) {
|
private boolean performHandshake(StreamContext ctxIn, ContactId contactId) {
|
||||||
LOG.info("Performing handshake (Incoming)");
|
LOG.info("Performing handshake (Incoming)");
|
||||||
// Allocate the outgoing stream context
|
// Allocate the outgoing stream context
|
||||||
StreamContext ctxOut =
|
StreamContext ctxOut;
|
||||||
allocateStreamContext(contactId, transportId);
|
|
||||||
if (ctxOut == null) {
|
try {
|
||||||
|
ctxOut = keyManager.getStreamContextInHandshakeMode(contactId, transportId);
|
||||||
|
} catch (DbException e) {
|
||||||
|
logException(LOG, WARNING, e);
|
||||||
LOG.warning("Could not allocate stream context");
|
LOG.warning("Could not allocate stream context");
|
||||||
onReadError(true);
|
onReadError(true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
InputStream in = streamReaderFactory.createStreamReader(
|
InputStream in = streamReaderFactory.createStreamReader(
|
||||||
reader.getInputStream(), ctxIn);
|
reader.getInputStream(), ctxIn);
|
||||||
|
|||||||
Reference in New Issue
Block a user