1 | static URLConnection setURLConnectionTimeouts(URLConnection con, long timeout) { |
2 | con.setConnectTimeout(toInt(timeout)); |
3 | con.setReadTimeout(toInt(timeout)); |
4 | if (con.getConnectTimeout() != timeout || con.getReadTimeout() != timeout) |
5 | print("Warning: Timeouts not set by JDK."); |
6 | ret con; |
7 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1002895 |
Snippet name: | setURLConnectionTimeouts |
Eternal ID of this version: | #1002895/3 |
Text MD5: | c8a2095d5d0ead4d759d13b72e685a86 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-10 17:19:37 |
Source code size: | 303 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 719 / 709 |
Version history: | 2 change(s) |
Referenced in: | [show references] |