Adding socket error checking on AdhocServer