code: @Override
      public void doExceptionCaught(final long sessionId, final Throwable cause) throws Exception {
          ThreadGatewayStats stats = gatewayStats.get();
          stats.doExceptionCaught();
      }
docs: This must run ON the IO thread