Skip to content

Commit 9e125b8

Browse files
committed
Logging on socket open/close
1 parent e0ad71d commit 9e125b8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/com/beowulfe/hap/impl/http/impl/AccessoryHandler.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,15 @@ public void channelActive(ChannelHandlerContext ctx) throws Exception {
3737
if (!channel.isActive()) { return; }
3838
channel.writeAndFlush(NettyResponseUtil.createResponse(response));
3939
});
40+
LOGGER.info("New homekit connection from "+ctx.channel().remoteAddress().toString());
4041
super.channelActive(ctx);
4142
}
43+
44+
@Override
45+
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
46+
LOGGER.info("Terminated homekit connection from "+ctx.channel().remoteAddress().toString());
47+
super.channelInactive(ctx);
48+
}
4249

4350
@Override
4451
public void channelRead0(ChannelHandlerContext ctx, FullHttpRequest req)

0 commit comments

Comments
 (0)