Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Consider not calling disconnect on the connection in LogglyAppender #8

Closed
robmoore opened this issue Aug 15, 2013 · 1 comment
Closed
Labels

Comments

@robmoore
Copy link

We are seeing deadlock issues where we are using LogglyAppender wrapped in an AsyncAppender. I was reviewing the LogglyAppender code to see if there's anything that might account for it there and noticed that connection.disconnect() is being called. From the Javadocs (http://docs.oracle.com/javase/7/docs/api/java/net/HttpURLConnection.html#disconnect()), it looks like it might be worth considering not calling disconnect as the docs suggest it is a hint to connection that "Indicates that other requests to the server are unlikely in the near future". It's unclear what effect calling disconnect() will have but it seems in a case like ours where we are sending logging entries to Loggly frequently that it might be causing us to incur unnecessary overhead.

@tony19
Copy link
Contributor

tony19 commented Feb 28, 2014

I'm not sure that omitting the call to #disconnect() is the answer as that could cause a resource leak. Perhaps we could provide an option to cache the connection and call #disconnect() only when stopping the appender (similar to the behavior of SocketAppender).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants