File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
src/main/java/api/longpoll/bots/methods/impl Expand file tree Collapse file tree 3 files changed +9
-4
lines changed 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