fix buffer too short exception

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
Ludovic Orban 2021-03-17 08:20:11 +01:00 committed by Simone Bordet
parent 81e3546b14
commit d12550f88a
2 changed files with 4 additions and 3 deletions

View File

@ -143,13 +143,14 @@ public class QuicConnection extends AbstractConnection
{ {
session = new QuicSession(connector, quicheConnection, this, remoteAddress); session = new QuicSession(connector, quicheConnection, this, remoteAddress);
sessions.putIfAbsent(quicheConnectionId, session); sessions.putIfAbsent(quicheConnectionId, session);
session.flush();
if (LOG.isDebugEnabled()) if (LOG.isDebugEnabled())
LOG.debug("created QUIC session {}", session); LOG.debug("created QUIC session {}", session);
} }
continue;
} }
if (session != null) session.process(remoteAddress, cipherBuffer);
session.process(remoteAddress, cipherBuffer);
} }
} }
catch (Throwable x) catch (Throwable x)

View File

@ -200,7 +200,7 @@ public class ServerDatagramEndPoint extends IdleTimeout implements EndPoint, Man
public Runnable onSelected() public Runnable onSelected()
{ {
// TODO: need to handle both read and write events. // TODO: need to handle both read and write events.
selectionKey.interestOps(~SelectionKey.OP_READ); //selectionKey.interestOps(~SelectionKey.OP_READ);
return () -> return () ->