Proxy websocket ping frames.
fixes gh-729
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -15,7 +15,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-build</artifactId>
|
||||
<version>2.2.2.BUILD-SNAPSHOT</version>
|
||||
<version>2.2.3.BUILD-SNAPSHOT</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
<scm>
|
||||
|
||||
@@ -734,6 +734,7 @@ public class GatewayAutoConfiguration {
|
||||
webSocketClient.setMaxFramePayloadLength(
|
||||
properties.getWebsocket().getMaxFramePayloadLength());
|
||||
}
|
||||
webSocketClient.setHandlePing(properties.getWebsocket().isProxyPing());
|
||||
return webSocketClient;
|
||||
}
|
||||
|
||||
|
||||
@@ -603,6 +603,9 @@ public class HttpClientProperties {
|
||||
/** Max frame payload length. */
|
||||
private Integer maxFramePayloadLength;
|
||||
|
||||
/** Proxy ping frames to downstream services, defaults to true. */
|
||||
private boolean proxyPing = true;
|
||||
|
||||
public Integer getMaxFramePayloadLength() {
|
||||
return this.maxFramePayloadLength;
|
||||
}
|
||||
@@ -611,10 +614,19 @@ public class HttpClientProperties {
|
||||
this.maxFramePayloadLength = maxFramePayloadLength;
|
||||
}
|
||||
|
||||
public boolean isProxyPing() {
|
||||
return proxyPing;
|
||||
}
|
||||
|
||||
public void setProxyPing(boolean proxyPing) {
|
||||
this.proxyPing = proxyPing;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringCreator(this)
|
||||
.append("maxFramePayloadLength", maxFramePayloadLength).toString();
|
||||
.append("maxFramePayloadLength", maxFramePayloadLength)
|
||||
.append("proxyPing", proxyPing).toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-dependencies-parent</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>2.2.1.RELEASE</version>
|
||||
<version>2.2.3.BUILD-SNAPSHOT</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user