diff --git a/src/com/esotericsoftware/kryonet/TcpConnection.java b/src/com/esotericsoftware/kryonet/TcpConnection.java index 9056b7c2..4e495934 100644 --- a/src/com/esotericsoftware/kryonet/TcpConnection.java +++ b/src/com/esotericsoftware/kryonet/TcpConnection.java @@ -25,7 +25,7 @@ class TcpConnection { final Serialization serialization; private SelectionKey selectionKey; - private long lastWriteTime, lastReadTime; + private volatile long lastWriteTime, lastReadTime; private int currentObjectLength; private final Object writeLock = new Object();