net.c: Properly handle net_disconnect() while connecting
net.c: Properly handle net_disconnect() while connecting

This fixes a crash when closing a hub tab while it is trying to connect
to a hub.

srijan/ncdc,srijan/ncdc,Tilka/ncdc,Tilka/ncdc,srijan/ncdc