Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenlagus committed Feb 25, 2017
1 parent a801e7e commit 341cca7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
12 changes: 6 additions & 6 deletions telegrambots-meta/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.TimeUnit;

import static org.telegram.telegrambots.Constants.SOCKET_TIMEOUT;

/**
* @author Ruben Bermudez
* @version 1.0
Expand Down Expand Up @@ -142,6 +144,13 @@ public synchronized void start() {
.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();
}

Expand Down

0 comments on commit 341cca7

Please sign in to comment.