public void close() {
		try {
			if (running) {
				running = false;
				if (selector != null && conn != null) {
					selector.wakeup();
					conn.close();
				} else {
					onClose(conn);
				}
			}
		} catch (Exception ex) {

		}
	}