diff --git a/.classpath b/.classpath
index b468bc4..37e1a73 100644
--- a/.classpath
+++ b/.classpath
@@ -1,39 +1,38 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pom.xml b/pom.xml
index 047f246..39582f6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -50,5 +50,10 @@
envoy-server-standalone
+
+
+ src/main/resources
+
+
\ No newline at end of file
diff --git a/src/main/java/envoy/server/net/ObjectMessageReader.java b/src/main/java/envoy/server/net/ObjectMessageReader.java
index 51fa3df..1206cd6 100644
--- a/src/main/java/envoy/server/net/ObjectMessageReader.java
+++ b/src/main/java/envoy/server/net/ObjectMessageReader.java
@@ -5,7 +5,10 @@ import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
-import com.jenkov.nioserver.*;
+import com.jenkov.nioserver.IMessageReader;
+import com.jenkov.nioserver.Message;
+import com.jenkov.nioserver.MessageBuffer;
+import com.jenkov.nioserver.Socket;
import envoy.util.SerializationUtils;
@@ -47,10 +50,10 @@ public class ObjectMessageReader implements IMessageReader {
nextMessage.writeToMessage(buffer);
// Get message length
- if (nextMessage.length - nextMessage.offset < 4) return;
+ if (nextMessage.length < 4) return;
int length = SerializationUtils.bytesToInt(nextMessage.sharedArray, nextMessage.offset) + 4;
- if (nextMessage.length - nextMessage.offset >= length) {
+ if (nextMessage.length >= length) {
Message message = messageBuffer.getMessage();
message.writePartialMessageToMessage(nextMessage, nextMessage.offset + length);
completeMessages.add(nextMessage);