* SAM: Don't use direct byte buffers for streams (ticket #679)

DatagramServer one stays as it is a singleton.
This commit is contained in:
zzz
2012-08-09 15:12:17 +00:00
parent 8bada7f882
commit 39d9d3f5b6
4 changed files with 18 additions and 3 deletions

View File

@ -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();

View File

@ -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
{