Fixed onUpgradeFrom(): buffer must be copied.
This commit is contained in:
parent
7200b2df0e
commit
6b0e1d48c5
|
@ -92,8 +92,8 @@ public class HttpReceiverOverHTTP extends HttpReceiver implements HttpParser.Res
|
|||
{
|
||||
if (BufferUtil.hasContent(buffer))
|
||||
{
|
||||
ByteBuffer upgradeBuffer = buffer;
|
||||
releaseBuffer(); // TODO: right place to do this?
|
||||
ByteBuffer upgradeBuffer = ByteBuffer.allocate(buffer.remaining());
|
||||
upgradeBuffer.put(buffer);
|
||||
return upgradeBuffer;
|
||||
}
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue