File tree Expand file tree Collapse file tree 5 files changed +15
-10
lines changed
src/main/java/api/longpoll/bots/methods/impl Expand file tree Collapse file tree 5 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 88 runs-on : ubuntu-latest
99
1010 steps :
11- - uses : actions/checkout@v2
11+ - uses : actions/checkout@v3
1212 - name : Set up JDK 8
13- uses : actions/setup-java@v2
13+ uses : actions/setup-java@v3
1414 with :
1515 java-version : ' 8'
1616 distribution : ' adopt'
Original file line number Diff line number Diff line change @@ -38,11 +38,11 @@ jobs:
3838
3939 steps :
4040 - name : Checkout repository
41- uses : actions/checkout@v2
41+ uses : actions/checkout@v3
4242
4343 # Initializes the CodeQL tools for scanning.
4444 - name : Initialize CodeQL
45- uses : github/codeql-action/init@v1
45+ uses : github/codeql-action/init@v2
4646 with :
4747 languages : ${{ matrix.language }}
4848 # If you wish to specify custom queries, you can do so here or in a config file.
5353 # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5454 # If this step fails, then you should remove it and run the build manually (see below)
5555 - name : Autobuild
56- uses : github/codeql-action/autobuild@v1
56+ uses : github/codeql-action/autobuild@v2
5757
5858 # ℹ️ Command-line programs to run using the OS shell.
5959 # 📚 https://git.io/JvXDl
6767 # make release
6868
6969 - name : Perform CodeQL Analysis
70- uses : github/codeql-action/analyze@v1
70+ uses : github/codeql-action/analyze@v2
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ This library uses the next third-party dependencies:
5050 <dependency >
5151 <groupId >com.github.yvasyliev</groupId >
5252 <artifactId >java-vk-bots-longpoll-api</artifactId >
53- <version >4.1.1 </version >
53+ <version >4.1.2 </version >
5454 </dependency >
5555 ```
56564 . Extend ` LongPollBot ` class and override necessary methods:
Original file line number Diff line number Diff line change 66 <groupId >com.github.yvasyliev</groupId >
77 <artifactId >java-vk-bots-longpoll-api</artifactId >
88 <packaging >jar</packaging >
9- <version >4.1.1 </version >
9+ <version >4.1.2 </version >
1010 <name >Java VK Bots Long Poll API</name >
1111 <description >A Java library to create VK bots using Bots Long Poll API</description >
1212 <url >https://github.com/yvasyliev/java-vk-bots-long-poll-api</url >
Original file line number Diff line number Diff line change @@ -34,6 +34,11 @@ public abstract class VkMethod<VkResponse> {
3434 */
3535 private static final Logger LOGGER = LoggerFactory .getLogger (VkMethod .class );
3636
37+ /**
38+ * Timeout for HTTP calls.
39+ */
40+ private static final int DEFAULT_TIMEOUT = 60 ;
41+
3742 /**
3843 * Validator to check if VK API response is valid.
3944 */
@@ -58,8 +63,8 @@ public abstract class VkMethod<VkResponse> {
5863 * HTTP client.
5964 */
6065 private final OkHttpClient okHttpClient = new OkHttpClient .Builder ()
61- .callTimeout (32 , TimeUnit .SECONDS )
62- .readTimeout (32 , TimeUnit .SECONDS )
66+ .callTimeout (DEFAULT_TIMEOUT , TimeUnit .SECONDS )
67+ .readTimeout (DEFAULT_TIMEOUT , TimeUnit .SECONDS )
6368 .addInterceptor (new LoggerInterceptor (LOGGER ))
6469 .build ();
6570
You can’t perform that action at this time.
0 commit comments