try {  s.setSoTimeout(60*1000); } catch (SocketException e) { s = null; }
  public static Socket get_socket(Object key)  {    Socket s = (Socket) sockets.get(key);    if (s != null && s.isClosed())      {        sockets.remove(key);        return null;      }    else      {        sockets.remove(key);        return s;      }  }