Ignore:
Timestamp:
2011-06-26T13:43:35+02:00 (13 years ago)
Author:
stoecker
Message:

remove unused icons, make connection timouts configurable and increase them a bit to handle JOSM server delays

Location:
trunk/src/org/openstreetmap/josm/io
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java

    r4153 r4172  
    6565                if(Main.applet) {
    6666                    URLConnection conn = url.openConnection();
    67                     conn.setConnectTimeout(5000);
    68                     conn.setReadTimeout(5000);
     67                    conn.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect",15)*1000);
     68                    conn.setReadTimeout(Main.pref.getInteger("socket.timeout.read",30)*1000);
    6969                    fs = new BufferedInputStream(conn.getInputStream());
    7070                    file = new File(url.getFile());
     
    218218        try {
    219219            URLConnection conn = url.openConnection();
    220             conn.setConnectTimeout(5000);
    221             conn.setReadTimeout(5000);
     220            conn.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect",15)*1000);
     221            conn.setReadTimeout(Main.pref.getInteger("socket.timeout.read",30)*1000);
    222222            bis = new BufferedInputStream(conn.getInputStream());
    223223            FileOutputStream fos = new FileOutputStream(destDirFile);
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r4100 r4172  
    546546                System.out.print(requestMethod + " " + url + "... ");
    547547                activeConnection = (HttpURLConnection)url.openConnection();
    548                 activeConnection.setConnectTimeout(fastFail ? 1000 : 15000);
     548                activeConnection.setConnectTimeout(fastFail ? 1000 : Main.pref.getInteger("socket.timeout.connect",15)*1000);
    549549                activeConnection.setRequestMethod(requestMethod);
    550550                if (doAuthenticate) {
  • trunk/src/org/openstreetmap/josm/io/OsmServerReader.java

    r3511 r4172  
    7979            }
    8080
    81             activeConnection.setConnectTimeout(15000);
     81            activeConnection.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect",15)*1000);
    8282
    8383            try {
  • trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java

    r4126 r4172  
    175175        }
    176176        conn.setRequestProperty("User-Agent", Main.pref.get("imagery.wms.user_agent", Version.getInstance().getAgentString()));
    177         conn.setConnectTimeout(Main.pref.getInteger("imagery.wms.timeout.connect", 30) * 1000);
    178         conn.setReadTimeout(Main.pref.getInteger("imagery.wms.timeout.read", 30) * 1000);
     177        conn.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect",15) * 1000);
     178        conn.setReadTimeout(Main.pref.getInteger("socket.timeout.read", 30) * 1000);
    179179
    180180        String contentType = conn.getHeaderField("Content-Type");
Note: See TracChangeset for help on using the changeset viewer.