windows: fix console signal handler refcount
Backport of 0c726e7 from master
This commit is contained in:
parent
6855205ba5
commit
b9d5396a40
@ -129,8 +129,10 @@ static uv_err_t uv__signal_register_control_handler() {
|
||||
|
||||
/* If the console control handler has already been hooked, just add a */
|
||||
/* reference. */
|
||||
if (uv__signal_control_handler_refs > 0)
|
||||
if (uv__signal_control_handler_refs > 0) {
|
||||
uv__signal_control_handler_refs++;
|
||||
return uv_ok_;
|
||||
}
|
||||
|
||||
if (!SetConsoleCtrlHandler(uv__signal_control_handler, TRUE))
|
||||
return uv__new_sys_error(GetLastError());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user