通过增加promise_finish函数,实现future的cancel。
This commit is contained in:
@@ -707,10 +707,10 @@ failed:
|
||||
return;
|
||||
}
|
||||
|
||||
static void ssl_async_peek_client_hello(struct future * future, evutil_socket_t fd, struct event_base * evbase,
|
||||
static void ssl_async_peek_client_hello(struct future * f, evutil_socket_t fd, struct event_base * evbase,
|
||||
void * logger)
|
||||
{
|
||||
struct promise * p = future_to_promise(future);
|
||||
struct promise * p = future_to_promise(f);
|
||||
struct peek_client_hello_ctx * ctx = ALLOC(struct peek_client_hello_ctx, 1);
|
||||
ctx->ev = event_new(evbase, fd, EV_READ, peek_client_hello_cb, p);
|
||||
ctx->logger = logger;
|
||||
|
||||
Reference in New Issue
Block a user