This commit is contained in:
Rubenlagus 2017-02-25 13:53:01 +01:00 committed by Ruben Bermudez
parent a801e7ec4c
commit 341cca78dd
2 changed files with 15 additions and 6 deletions

View File

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.telegram</groupId>
<artifactId>telegrambots-meta</artifactId>
<version>2.4.4.4</version>
<version>2.4.4.5</version>
<packaging>jar</packaging>
<name>Telegram Bots Meta</name>
@ -216,16 +216,16 @@
<executions>
<execution>
<id>enforce</id>
<configuration>
<rules>
<DependencyConvergence />
</rules>
</configuration>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
<configuration>
<rules>
<DependencyConvergence />
</rules>
</configuration>
</plugin>
</plugins>
<pluginManagement>

View File

@ -36,6 +36,8 @@ import java.util.List;
import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.TimeUnit;
import static org.telegram.telegrambots.Constants.SOCKET_TIMEOUT;
/**
* @author Ruben Bermudez
* @version 1.0
@ -142,6 +144,13 @@ public class DefaultBotSession implements BotSession {
.build();
requestConfig = options.getRequestConfig();
if (requestConfig == null) {
requestConfig = RequestConfig.copy(RequestConfig.custom().build())
.setSocketTimeout(SOCKET_TIMEOUT)
.setConnectTimeout(SOCKET_TIMEOUT)
.setConnectionRequestTimeout(SOCKET_TIMEOUT).build();
}
super.start();
}