Skip to content

Commit

Permalink
fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Wraith2 committed May 5, 2020
1 parent f83eefa commit e63b8b8
Showing 1 changed file with 27 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,9 @@ public void HandleReceiveComplete(SNIPacket packet, uint sniErrorCode)

_currentHeader.Read(_headerBytes);

_dataBytesLeft = (int)_currentHeader.length;
_currentPacket = _lowerHandle.RentPacket(headerSize: 0, dataSize: (int)_currentHeader.length);
}
_dataBytesLeft = (int)_currentHeader.length;
_currentPacket = _lowerHandle.RentPacket(headerSize: 0, dataSize: (int)_currentHeader.length);
}

currentHeader = _currentHeader;
currentPacket = _currentPacket;
Expand Down Expand Up @@ -313,22 +313,22 @@ public void HandleReceiveComplete(SNIPacket packet, uint sniErrorCode)
currentSession.HandleReceiveComplete(currentPacket, currentHeader);
}

if (_currentHeader.flags == (byte)SNISMUXFlags.SMUX_ACK)
{
try
{
currentSession.HandleAck(currentHeader.highwater);
}
catch (Exception e)
if (_currentHeader.flags == (byte)SNISMUXFlags.SMUX_ACK)
{
SNICommon.ReportSNIError(SNIProviders.SMUX_PROV, SNICommon.InternalExceptionError, e);
}
try
{
currentSession.HandleAck(currentHeader.highwater);
}
catch (Exception e)
{
SNICommon.ReportSNIError(SNIProviders.SMUX_PROV, SNICommon.InternalExceptionError, e);
}

Debug.Assert(_currentPacket == currentPacket, "current and _current are not the same");
ReturnPacket(currentPacket);
currentPacket = null;
_currentPacket = null;
}
Debug.Assert(_currentPacket == currentPacket, "current and _current are not the same");
ReturnPacket(currentPacket);
currentPacket = null;
_currentPacket = null;
}

lock (this)
{
Expand Down Expand Up @@ -385,6 +385,16 @@ public void DisableSsl()
}
}

public SNIPacket RentPacket(int headerSize, int dataSize)
{
return _lowerHandle.RentPacket(headerSize, dataSize);
}

public void ReturnPacket(SNIPacket packet)
{
_lowerHandle.ReturnPacket(packet);
}

#if DEBUG
/// <summary>
/// Test handle for killing underlying connection
Expand Down

0 comments on commit e63b8b8

Please sign in to comment.