forked from I2P_Developers/i2p.i2p
* SAM: Don't use direct byte buffers for streams (ticket #679)
DatagramServer one stays as it is a singleton.
This commit is contained in:
@ -566,7 +566,7 @@ public class SAMStreamSession {
|
||||
_log.debug("run() called for socket reader " + id);
|
||||
|
||||
int read = -1;
|
||||
ByteBuffer data = ByteBuffer.allocateDirect(SOCKET_HANDLER_BUF_SIZE);
|
||||
ByteBuffer data = ByteBuffer.allocate(SOCKET_HANDLER_BUF_SIZE);
|
||||
|
||||
try {
|
||||
InputStream in = i2pSocket.getInputStream();
|
||||
|
@ -510,7 +510,7 @@ public class SAMv2StreamSession extends SAMStreamSession
|
||||
_log.debug ( "run() called for socket reader " + id );
|
||||
|
||||
int read = -1;
|
||||
ByteBuffer data = ByteBuffer.allocateDirect(SOCKET_HANDLER_BUF_SIZE);
|
||||
ByteBuffer data = ByteBuffer.allocate(SOCKET_HANDLER_BUF_SIZE);
|
||||
|
||||
try
|
||||
{
|
||||
|
Reference in New Issue
Block a user