return client;
}
private void sendError(ChannelHandlerContext ctx, String origin, UUID sessionId) {
log.debug("Client with sessionId: {} was not found! Reconnect error response sended", sessionId);
Packet packet = new Packet(PacketType.ERROR);
packet.setReason(ErrorReason.CLIENT_NOT_HANDSHAKEN);
packet.setAdvice(ErrorAdvice.RECONNECT);
ctx.channel().write(new XHRErrorMessage(packet, origin, sessionId));
}