Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #150 from scalecube/update-services
Browse files Browse the repository at this point in the history
Update services to -RC3
  • Loading branch information
artem-v authored Jun 15, 2020
2 parents 01b9a3e + 5649934 commit 7ff31a2
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 21 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<properties>
<scalecube-commons.version>1.0.4</scalecube-commons.version>
<scalecube-services.version>2.10.0-RC2</scalecube-services.version>
<scalecube-services.version>2.10.0-RC3</scalecube-services.version>
<scalecube-benchmarks.version>1.2.2</scalecube-benchmarks.version>
<scalecube-config.version>0.4.3</scalecube-config.version>
<reactor.version>Dysprosium-SR8</reactor.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import io.netty.buffer.ByteBuf;
import io.rsocket.Payload;
import io.scalecube.services.api.ServiceMessage;
import io.scalecube.services.gateway.transport.http.HttpGatewayClient;
import io.scalecube.services.gateway.transport.http.HttpGatewayClientCodec;
import io.scalecube.services.gateway.transport.rsocket.RSocketGatewayClient;
Expand All @@ -12,22 +11,13 @@
import io.scalecube.services.transport.api.ClientTransport;
import io.scalecube.services.transport.api.DataCodec;
import io.scalecube.services.transport.api.HeadersCodec;
import io.scalecube.services.transport.api.ReferenceCountUtil;
import java.util.function.Function;
import reactor.core.publisher.Hooks;

public class GatewayClientTransports {

private static final String CONTENT_TYPE = "application/json";
private static final HeadersCodec HEADERS_CODEC = HeadersCodec.getInstance(CONTENT_TYPE);

static {
Hooks.onNextDropped(
obj ->
ReferenceCountUtil.safestRelease(
obj instanceof ServiceMessage ? ((ServiceMessage) obj).data() : obj));
}

public static final GatewayClientCodec<ByteBuf> WEBSOCKET_CLIENT_CODEC =
new WebsocketGatewayClientCodec(DataCodec.getInstance(CONTENT_TYPE));
public static final GatewayClientCodec<Payload> RSOCKET_CLIENT_CODEC =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package io.scalecube.services.gateway;

import io.scalecube.services.api.ServiceMessage;
import java.net.InetSocketAddress;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import reactor.core.publisher.Hooks;
import reactor.core.publisher.Mono;
import reactor.netty.DisposableServer;
import reactor.netty.http.server.HttpServer;
Expand All @@ -14,14 +12,6 @@ public abstract class GatewayTemplate implements Gateway {

private static final Logger LOGGER = LoggerFactory.getLogger(GatewayTemplate.class);

static {
Hooks.onNextDropped(
obj -> {
ReferenceCountUtil.safestRelease(
obj instanceof ServiceMessage ? ((ServiceMessage) obj).data() : obj);
});
}

protected final GatewayOptions options;

protected GatewayTemplate(GatewayOptions options) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ void testKeepalive()
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
if (msg instanceof PongWebSocketFrame) {
((PongWebSocketFrame) msg).release();
keepaliveLatch.countDown();
} else {
super.channelRead(ctx, msg);
Expand Down

0 comments on commit 7ff31a2

Please sign in to comment.