private void CheckConnection() throws IOException {
		if(!ClientSocket.isConnected()){
			String username = null;
			for(int i=0 ; i<goChatServer.connectedSockets.size();i++){
				if (goChatServer.connectedSockets.get(i) == ClientSocket){
					goChatServer.connectedSockets.remove(i);
				}
			}
			
			for(Map.Entry<String, Socket> user : goChatServer.connectedUserandSocket.entrySet()){
				if(user.getValue() == ClientSocket){
					username = user.getKey();
					notifyDisconnect(username);
					goChatServer.serverGUI.conversationTextArea.append(username+" disconnected \n");
				}
			}
			
			goChatServer.connectedUsers.remove(username);
			
			for(Socket connectedSocket : goChatServer.connectedSockets){
				PrintWriter Out = new PrintWriter(connectedSocket.getOutputStream());
				Out.println("VIS#$"+goChatServer.visibleUsers);
				Out.flush();
			}
			
			for(String pair:goChatServer.connectedListPair){
				if(pair.contains(username)){
					goChatServer.connectedListPair.remove(pair);
					break;
				}
			}
			arrayPairs = goChatServer.connectedListPair.toArray(new String[goChatServer.connectedListPair.size()]);
			goChatServer.serverGUI.chatPairList.setListData(arrayPairs);			
			
		}
		
		
	}