public synchronized void transportConnected() {
		setState(STATE_READY);
		if (reconnectTask != null) {
			reconnectTask.cancel();
			reconnectTask = null;
		}
		resetTimeout();
		if (transport.canSendBulk()) {
			ConcurrentLinkedQueue<String> outputBuffer = this.outputBuffer;
			this.outputBuffer = new ConcurrentLinkedQueue<String>();
			try {
				// DEBUG
				String[] texts = outputBuffer.toArray(new String[outputBuffer
						.size()]);
				//logger.info("Bulk start:");
				for (String text : texts) {
					//logger.info("> " + text);
				}
				//logger.info("Bulk end");
				// DEBUG END
				transport.sendBulk(texts);
			} catch (IOException e) {
				this.outputBuffer = outputBuffer;
			}
		} else {
			String text;
			while ((text = outputBuffer.poll()) != null)
				sendPlain(text);
		}
		this.keepAliveInQueue = false;
	}