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

View File

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