AsyncIO crashes with a segfault if onConnect returns an Error

Summary

The engine crashes with a segfault if onConnect returns an error for a tcpconnect

Steps to reproduce

Run a listening netcat instance:

nc -l -p 8123

Compile and run the following Clean code:

module itask

import StdDebug
import iTasks

Start w = doTasks t w

t :: Task ()
t = withShared () \sds->tcpconnect "localhost" (Port 8123) (?Just 500) sds
	{ ConnectionHandlers
	| onConnect = \cId ipAddr ()->
		trace_n ("onConnect " +++ toSingleLineText (cId, ipAddr))
		(Error ("oops, wrong number: " +++ ipAddr), ?None, [], False)
	, onData = \cId data () ()->
		trace_n ("onData " +++ toSingleLineText (cId, data))
		(Ok ?None, ?None, [], False)
	, onShareChange = \() ()->
		trace_n ("onShareChange")
		(Ok ?None, ?None, [], False)
	, onDisconnect = \cId () ()->
		trace_n ("onDisconnect " +++ toSingleLineText cId)
		(Ok ?None, ?None)
	, onDestroy = \()->
		trace_n ("onDestroy")
		(Ok ?None, [])
	}

What is the current bug behavior?

Segfault in AsyncIO's anyPendingPacketsC

What is the expected correct behavior?

That the error is lifted to an iTask exception.

Relevant logs, screenshots, ...

Program received signal SIGSEGV, Segmentation fault.
0x0000000000ad4474 in anyPendingPacketsC ()
(gdb) bt
#0  0x0000000000ad4474 in anyPendingPacketsC ()
#1  0x0000000000a918a8 in e____AsyncIO__sanyPendingPackets ()
#2  0x000000000097265d in e__Data_PMap__salter ()
#3  0x0000000000a9183c in e____AsyncIO__sanyPendingPackets ()
#4  0x00000000008e400d in e__AsyncIO__scloseConnection ()
#5  0x0000000000000003 in ?? ()
#6  0x000000000000000a in ?? ()
#7  0x00000000008e0f65 in e__AsyncIO__stick ()
#8  0x0000000000a7207a in e__iTasks_PInternal_PTaskServer__sloop ()
#9  0x00000000009d0619 in e__iTasks_PEngine__eadoTasksWithOptions ()
#10 0x0000000000417b77 in __eval__to__nf ()
#11 0x0000000000417b69 in __eval__to__nf ()
#12 0x00000000004039ef in abc_main ()
#13 0x00007ffff7ffd020 in _dl_catch_error@got.plt ()
   from /lib64/ld-linux-x86-64.so.2
#14 0x0000000000ae1df0 in __frame_dummy_init_array_entry ()
#15 0x00007fffffffe4c8 in ?? ()
#16 0x00007fffffffe4b8 in ?? ()
#17 0x0000000000bf2edf in appl_path ()
#18 0x000000000000002f in ?? ()
#19 0x0000000000000001 in ?? ()
#20 0x0000000000000000 in ?? ()

Possible fixes

not sure yet.