Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
apollo
Commits
fe3782b5
Commit
fe3782b5
authored
May 31, 2016
by
Jason Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shorten long polling timeout
parent
a385ec80
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
RemoteConfigRepository.java
...ip/framework/apollo/internals/RemoteConfigRepository.java
+2
-2
NotificationController.java
...ollo/configservice/controller/NotificationController.java
+1
-1
No files found.
apollo-client/src/main/java/com/ctrip/framework/apollo/internals/RemoteConfigRepository.java
View file @
fe3782b5
...
...
@@ -274,8 +274,8 @@ public class RemoteConfigRepository extends AbstractConfigRepository {
logger
.
debug
(
"Long polling from {}"
,
url
);
HttpRequest
request
=
new
HttpRequest
(
url
);
//
no timeout for read
request
.
setReadTimeout
(
0
);
//
longer timeout for read - 1 minute
request
.
setReadTimeout
(
6000
0
);
transaction
=
Cat
.
newTransaction
(
"Apollo.ConfigService"
,
"pollNotification"
);
transaction
.
addData
(
"Url"
,
url
);
...
...
apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/controller/NotificationController.java
View file @
fe3782b5
...
...
@@ -40,7 +40,7 @@ import java.util.Set;
@RequestMapping
(
"/notifications"
)
public
class
NotificationController
implements
MessageListener
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
NotificationController
.
class
);
private
static
final
long
TIMEOUT
=
3
60
*
60
*
1000
;
//6 hour
s
private
static
final
long
TIMEOUT
=
3
0
*
1000
;
//30 second
s
private
final
Multimap
<
String
,
DeferredResult
<
ResponseEntity
<
ApolloConfigNotification
>>>
deferredResults
=
Multimaps
.
synchronizedSetMultimap
(
HashMultimap
.
create
());
private
static
final
ResponseEntity
<
ApolloConfigNotification
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment