cu/net2: fix a bug in error handling