From d9eb445d84abb6299698fa9fc8acaf69a8598402 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 21 Oct 2004 23:36:27 +0000 Subject: [PATCH] Log if we write out big messages because I saw some stuff about bugs in Windows where it wigs out and behaves as if the connection was reset by the peer ("An existing connection was forcibly closed by the remote host") if one writes messages bigger than about 25k. I can't imagine how we would be sending such big messages to the server, but it's worth a check. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3159 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/presents/client/Communicator.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/presents/client/Communicator.java b/src/java/com/threerings/presents/client/Communicator.java index 2de17f75e..2b1fb4ccb 100644 --- a/src/java/com/threerings/presents/client/Communicator.java +++ b/src/java/com/threerings/presents/client/Communicator.java @@ -1,5 +1,5 @@ // -// $Id: Communicator.java,v 1.35 2004/08/27 02:20:18 mdb Exp $ +// $Id: Communicator.java,v 1.36 2004/10/21 23:36:27 mdb Exp $ // // Narya library - tools for developing networked games // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved @@ -312,6 +312,10 @@ public class Communicator // then write the framed message to actual output stream try { ByteBuffer buffer = _fout.frameAndReturnBuffer(); + if (buffer.limit() > 4096) { + Log.info("Whoa, writin' a big one [msg=" + msg + + ", size=" + buffer.limit() + "]."); + } int wrote = _channel.write(buffer); if (wrote != buffer.limit()) { Log.warning("Aiya! Couldn't write entire message [msg=" + msg +