Commit 53b7a70f authored by Maria Matejka's avatar Maria Matejka
Browse files

Merge remote-tracking branch 'origin/mq-async-export' into HEAD

parents 0f49a5fa 6ee76c9e
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -992,6 +992,12 @@ krt_sock_err_hook(sock *sk, int e UNUSED)
  krt_sock_hook(sk, 0);
}

static const struct sock_class krt_sock_class = {
  .rx_hook = krt_sock_hook,
  .cli_info = krt_sock_info,
  .rx_err = krt_sock_err_hook,
};

static sock *
krt_sock_open(pool *pool, void *data, int table_id UNUSED)
{
@@ -1012,12 +1018,7 @@ krt_sock_open(pool *pool, void *data, int table_id UNUSED)

  sk = sk_new(pool);
  sk->type = SK_MAGIC;

  EVENT_LOCKED_INIT(sk,
      .rx_hook = krt_sock_hook,
      .cli_info = krt_sock_info,
      .rx_err = krt_sock_err_hook,
      );
  sk->class = &krt_sock_class;

  sk->fd = fd;
  sk->data = data;