fix packet reading on android

This commit is contained in:
matthias.ringwald@gmail.com 2015-01-14 20:22:51 +00:00
parent 76b4a2b4c3
commit ed3a7d82f6

View File

@ -73,10 +73,10 @@ public class SocketConnectionUnix extends SocketConnection {
int channel = Util.readBt16(inHeader, 2);
int len = Util.readBt16(inHeader, 4);
Util.readExactly(in, inPayload, 0, len);
bytes_read = Util.readExactly(in, inPayload, 0, len);
if (bytes_read != len) return null;
Packet packet = new Packet(packetType, channel ,inPayload, len);
Packet packet = new Packet(packetType, channel, inPayload, len);
return packet;
}