public static Packet fabricatePacket(Message msg){
		numPacketsOnTheFly++;
		if(freePackets.empty()) {
			Packet p = new Packet(msg);
			synchronized(issuedPackets) {
				issuedPackets.append(p);
			}
			return p;
		}
		else{
			Packet rP = freePackets.pop();
			if(rP.message != null) {
				Main.fatalError(Logging.getCodePosition() + " Packet factory failed! About to return a packet that was already returned. (Probably, free() was called > 1 on this packet.)");
			}
			rP.ID = getNextFreeID();
			rP.message = msg;
			synchronized(issuedPackets) {
				issuedPackets.append(rP);
			}
			return rP;
		}
	}