connectcb could be called with empty handle on socket failure
Happens on macOS, but it will probably also happen on BSDs where the socket call might fail:
netmgr/netmgr.c:2510: REQUIRE(((__builtin_expect(!!((uvreq->handle) != ((void*)0)), 1) && __builtin_expect(!!(((const isc__magic_t *)(uvreq->handle))->magic == ((('N') << 24 | ('M') << 16 | ('H') << 8 | ('D')))), 1)) && __c11_atomic_load(&(uvreq->handle)->references, 5) > 0)) failed, back trace
netmgr/netmgr.c:2510: REQUIRE(((__builtin_expect(!!((uvreq->handle) != ((void*)0)), 1) && __builtin_expect(!!(((const isc__magic_t *)(uvreq->handle))->magic == ((('N') << 24 | ('M') << 16 | ('H') << 8 | ('D')))), 1)) && __c11_atomic_load(&(uvreq->handle)->references, 5) > 0)) failed, back trace
0 libisc-9.17.11.dylib 0x00000001081d08d1 default_callback + 81
1 libisc-9.17.11.dylib 0x00000001081d085a isc_assertion_failed + 10
2 libisc-9.17.11.dylib 0x00000001081ac1e1 isc__nm_connectcb + 193
3 netmgr_test 0x000000010814dcbc isc_nm_udpconnect + 380
4 netmgr_test 0x0000000108155c93 udp_connect + 51
5 netmgr_test 0x0000000108155bf9 connect_thread + 137
6 libisc-9.17.11.dylib 0x00000001081ef7fe isc__trampoline_run + 62
7 libsystem_pthread.dylib 0x00007fff20594950 _pthread_start + 224
8 libsystem_pthread.dylib 0x00007fff2059047b thread_start + 15
0 libisc-9.17.11.dylib 0x00000001081d08d1 default_callback + 81
1 libisc-9.17.11.dylib 0x00000001081d085a isc_assertion_failed + 10
2 libisc-9.17.11.dylib 0x00000001081ac1e1 isc__nm_connectcb + 193
3 netmgr_test 0x000000010814dcbc isc_nm_udpconnect + 380
4 netmgr_test 0x0000000108155c93 udp_connect + 51
5 netmgr_test 0x0000000108155bf9 connect_thread + 137
6 libisc-9.17.11.dylib 0x00000001081ef7fe isc__trampoline_run + 62
7 libsystem_pthread.dylib 0x00007fff20594950 _pthread_start + 224
8 libsystem_pthread.dylib 0x00007fff2059047b thread_start + 15
Abort trap: 6