projects
/
org.ibex.jinetd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
383219a
)
better logging
author
adam
<adam@megacz.com>
Sat, 30 Oct 2004 08:47:45 +0000
(08:47 +0000)
committer
adam
<adam@megacz.com>
Sat, 30 Oct 2004 08:47:45 +0000
(08:47 +0000)
darcs-hash:
20041030084745
-5007d-
f74341a4845a9964203ea4415c536afcff613f40
.gz
src/org/ibex/jinetd/Port.java
patch
|
blob
|
history
diff --git
a/src/org/ibex/jinetd/Port.java
b/src/org/ibex/jinetd/Port.java
index
8ac02a5
..
a55f7af
100644
(file)
--- a/
src/org/ibex/jinetd/Port.java
+++ b/
src/org/ibex/jinetd/Port.java
@@
-87,15
+87,20
@@
public class Port extends Loader {
void dispatch(final Connection conn) throws Exception {
new Thread(tg, new Runnable() { public void run() {
void dispatch(final Connection conn) throws Exception {
new Thread(tg, new Runnable() { public void run() {
+ String local = conn.getLocalAddress() + ":" + conn.getLocalPort();
+ String remote = conn.getRemoteHostname() + ":" + conn.getRemotePort();
try {
Class c = findListener();
if (c == null) throw new RuntimeException("couldn't find listener");
try {
Class c = findListener();
if (c == null) throw new RuntimeException("couldn't find listener");
- Log.info(this, "dispatching connection on port " + port + " to " + c.getName());
+ Log.info("["+local+"]", "connection from " + remote + " => " + c.getName());
Log.clearnotes();
final ClassLoader cl = getClassLoader();
Thread.currentThread().setContextClassLoader(cl);
Listener l = (Listener)c.newInstance();
l.accept(conn);
Log.clearnotes();
final ClassLoader cl = getClassLoader();
Thread.currentThread().setContextClassLoader(cl);
Listener l = (Listener)c.newInstance();
l.accept(conn);
+ } catch (org.ibex.io.Stream.EOF eof) {
+ Log.warn(this, "end of stream reached handling connection from " +
+ conn.getRemoteHostname() + ":" + conn.getRemotePort());
} catch (Exception e) {
Log.error(this, "Listener threw exception");
Log.error(this, e);
} catch (Exception e) {
Log.error(this, "Listener threw exception");
Log.error(this, e);