Return-Path: X-Original-To: apmail-logging-log4j-dev-archive@www.apache.org Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 443E8DAB0 for ; Tue, 14 May 2013 13:09:17 +0000 (UTC) Received: (qmail 27721 invoked by uid 500); 14 May 2013 13:09:16 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 27529 invoked by uid 500); 14 May 2013 13:09:16 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 27491 invoked by uid 99); 14 May 2013 13:09:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 May 2013 13:09:15 +0000 Date: Tue, 14 May 2013 13:09:15 +0000 (UTC) From: "Gary Gregory (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LOG4J2-246) UDP socket Appender error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LOG4J2-246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13657039#comment-13657039 ] Gary Gregory commented on LOG4J2-246: ------------------------------------- Note that the header issue I see in the @Ignore test is affected by a timing factor. It does not always happen from the debugger. > UDP socket Appender error > ------------------------- > > Key: LOG4J2-246 > URL: https://issues.apache.org/jira/browse/LOG4J2-246 > Project: Log4j 2 > Issue Type: Bug > Components: Appenders, Core > Affects Versions: 2.0-beta5 > Reporter: Remko Popma > > On 2013/05/09, at 18:34, Tomek Kaczynski wrote: > Hi All, > I'm using log4j2 since beta4, now beta5. In general it's a cute library, but there's some bug that I've found out recently : > When a client code genreates a huge message ( 64k ), the underlying DatagramOutputStream fails ( UDP socket throws exception). > After that all following flushes fail because data buffer is not cleared upon exception. > So in lines > DatagramOutputStream:91 > ---------------------------------------------------------------------- > public synchronized void flush() throws IOException { > if (this.data != null && this.ds != null && this.address != null) { > final DatagramPacket packet = new DatagramPacket(data, data.length, address, port); > ds.send(packet); > } > data = null; > } > -------------------------------------------------------------------------- > > data = null should be put in finally block or some simillar solution could be applied. > What do you think ? > Regards, > Tomek > Moreover DatagramOutputStream should check if message size is less then 64k . -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org