protected void closeSocks(String finalMsg)
	{
		if(sock[0]!=null)
		{
			synchronized(sock)
			{
				if(sock[0]!=null)
				{
					try
					{
						Log.sysOut("Disconnect: "+finalMsg+getAddress()+" ("+CMLib.time().date2SmartEllapsedTime(getMillisOnline(),true)+")");
						setStatus(SessionStatus.LOGOUT7);
						sock[0].shutdownInput();
						setStatus(SessionStatus.LOGOUT8);
						if(out!=null)
						{
							try
							{
								if(!out.checkError())
								{
									out.write(PINGCHARS);
									out.checkError();
								}
							}
							catch (final Exception t)
							{
							}
							out.close();
						}
						setStatus(SessionStatus.LOGOUT9);
						sock[0].shutdownOutput();
						setStatus(SessionStatus.LOGOUT10);
						sock[0].close();
						setStatus(SessionStatus.LOGOUT11);
					}
					catch(final IOException e)
					{
					}
					catch (final java.lang.ArrayIndexOutOfBoundsException e)
					{
					}
					finally
					{
						rawin=null;
						in=null;
						out=null;
						sock[0]=null;
					}
				}
			}
		}
	}