Bug #183
This commit is contained in:
parent
a801e7ec4c
commit
341cca78dd
@ -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>
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user