Skip to content

Commit bf490de

Browse files
committed
Add ConnectedStateCoalescingInterval, fixes #29
1 parent 982662d commit bf490de

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

StaticServerExample/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default class App extends Component<Props> {
5050

5151
download.promise.then(() => {
5252
// Create a StaticServer at a random port
53-
this.server = new StaticServer(this.port, this.root, {localOnly: true});
53+
this.server = new StaticServer(this.port, this.root, {localOnly: true, keepAlive: true});
5454

5555
return this.server.start().then((origin) => {
5656
this.setState({origin});

ios/FPStaticServer.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ - (dispatch_queue_t)methodQueue
9393

9494
if (self.keep_alive == YES) {
9595
[options setObject:@(NO) forKey:GCDWebServerOption_AutomaticallySuspendInBackground];
96+
[options setObject:@2.0 forKey:GCDWebServerOption_ConnectedStateCoalescingInterval];
9697
}
9798

9899

0 commit comments

Comments
 (0)