From 309d660bbb882b61fcfbcc9df1643d5efec5a10b Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Thu, 7 Apr 2022 17:52:52 +0200 Subject: [PATCH] remove unnecessary checks --- src/uvw/async.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/uvw/async.cpp b/src/uvw/async.cpp index 60b7a0e1..7af33af5 100644 --- a/src/uvw/async.cpp +++ b/src/uvw/async.cpp @@ -16,9 +16,8 @@ UVW_INLINE int async_handle::init() { } UVW_INLINE void async_handle::send() { - if(auto err = uv_async_send(raw()); err != 0) { - publish(error_event{err}); - } + // uv_async_send only returns an error if the handle has the wrong type which is not the case here + uv_async_send(raw()); } } // namespace uvw