public synchronized void eventRemoteDisconnect(DataOutputStream currentRemoteOut) {
		//eventRemoteDisconnect will sometimes be triggered multiple times on the same socket
		//here we make sure that this is the first trigger
		//NOTE: actually this shouldn't be a problem anymore because all disconnect events
		// come from GCForward, but just to make sure we keep the if statement
		if(currentRemoteOut != remoteOut) {
			return;
		}
		
		synchronized(remoteSync) {
			if(remoteSocket != null && remoteSocket.isConnected()) {
				try {
					remoteSocket.close();
				} catch(IOException ioe) {}
			}
			
			remoteSocket = null;
			remoteOut = null;
		}
		
		if(gproxy && !leaveGameSent && actionReceived) {
			sendLocalChat("You have been disconnected from the server.");
			host.main.log("[ECConnection] You have been disconnected from the server.");
			
			//calculate time we have remaining to reconnect
			long timeRemaining = (numEmptyActions - numEmptyActionsUsed + 1) * 60 * 1000 - (System.currentTimeMillis() - lastActionTime);
			
			if(timeRemaining < 0) {
				timeRemaining = 0;
			}
			
			sendLocalChat("GProxy++ is attempting to reconnect... (" + (timeRemaining / 1000) + " seconds remain)");
			host.main.log("GProxy++ is attempting to reconnect... (" + (timeRemaining / 1000) + " seconds remain)");
			
			//update time
			lastConnectionAttemptTime = System.currentTimeMillis();
			
			//reconnect
			gproxyReconnect();
		} else {
			terminate();
		}
	}