From f8e5c85d1fd84a8dd6263f2bdeadbc916985c39e Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Sat, 3 Jul 2004 09:19:04 +0000 Subject: [PATCH] Keep mum about connections being reset by their peer. It is a normal event in the wild, wild world of the Interweb. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3048 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/presents/server/net/Connection.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/java/com/threerings/presents/server/net/Connection.java b/src/java/com/threerings/presents/server/net/Connection.java index c431f4507..7f89735ee 100644 --- a/src/java/com/threerings/presents/server/net/Connection.java +++ b/src/java/com/threerings/presents/server/net/Connection.java @@ -1,5 +1,5 @@ // -// $Id: Connection.java,v 1.18 2004/02/25 14:45:16 mdb Exp $ +// $Id: Connection.java,v 1.19 2004/07/03 09:19:04 mdb Exp $ package com.threerings.presents.server.net; @@ -252,8 +252,13 @@ public abstract class Connection implements NetEventHandler "Unable to decode incoming message.", cnfe)); } catch (IOException ioe) { - Log.warning("Error reading message from socket " + - "[channel=" + _channel + ", error=" + ioe + "]."); + // don't log a warning for the ever-popular "the client + // dropped the connection" failure + String msg = ioe.getMessage(); + if (msg == null || msg.indexOf("reset by peer") == -1) { + Log.warning("Error reading message from socket " + + "[channel=" + _channel + ", error=" + ioe + "]."); + } // deal with the failure handleFailure(ioe); }