handle if netc is NULL
do not call on_connect directly