From d475b8871d4ab880da25d06f96fa20c7d810c005 Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Tue, 12 Nov 2013 20:34:10 +0100 Subject: [PATCH] Make last times volatile. --- src/com/esotericsoftware/kryonet/TcpConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();