mirror of https://github.com/apache/kafka.git
kafka-2252; Socket connection closing is logged, but not corresponding opening of socket; patched by Gwen Shapira; reviewed by Jun Rao
This commit is contained in:
parent
7009f1d6ff
commit
478505632e
|
@ -267,6 +267,7 @@ public class Selector implements Selectable {
|
||||||
key.interestOps(key.interestOps() & ~SelectionKey.OP_CONNECT | SelectionKey.OP_READ);
|
key.interestOps(key.interestOps() & ~SelectionKey.OP_CONNECT | SelectionKey.OP_READ);
|
||||||
this.connected.add(transmissions.id);
|
this.connected.add(transmissions.id);
|
||||||
this.sensors.connectionCreated.record();
|
this.sensors.connectionCreated.record();
|
||||||
|
log.debug("Connection {} created", transmissions.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read from any connections that have readable data */
|
/* read from any connections that have readable data */
|
||||||
|
@ -307,7 +308,7 @@ public class Selector implements Selectable {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
String desc = socketDescription(channel);
|
String desc = socketDescription(channel);
|
||||||
if (e instanceof EOFException || e instanceof ConnectException)
|
if (e instanceof EOFException || e instanceof ConnectException)
|
||||||
log.info("Connection {} disconnected", desc);
|
log.debug("Connection {} disconnected", desc);
|
||||||
else
|
else
|
||||||
log.warn("Error in I/O with connection to {}", desc, e);
|
log.warn("Error in I/O with connection to {}", desc, e);
|
||||||
close(transmissions.id);
|
close(transmissions.id);
|
||||||
|
|
Loading…
Reference in New Issue