Skip to content

Commit 4754c1b

Browse files
committed
remove shutdown() from TransportWithDisconnectReason
1 parent 449a8bc commit 4754c1b

File tree

3 files changed

+2
-21
lines changed

3 files changed

+2
-21
lines changed

core/src/main/java/io/grpc/internal/KeepAliveManager.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -272,15 +272,6 @@ public static final class ClientKeepAlivePinger implements KeepAlivePinger {
272272
@ThreadSafe
273273
public interface TransportWithDisconnectReason extends ClientTransport {
274274

275-
/**
276-
* Initiates an orderly shutdown of the transport. Existing streams continue, but the
277-
* transport will not own any new streams. New streams will either fail (once
278-
* {@link ManagedClientTransport.Listener#transportShutdown} callback called), or be
279-
* transferred off this transport (in which case they may succeed). This method may only be
280-
* called once.
281-
*/
282-
void shutdown(Status reason, DisconnectError disconnectError);
283-
284275
/**
285276
* Initiates a forceful shutdown in which preexisting and new calls are closed. Existing calls
286277
* should be closed with the provided {@code reason} and {@code disconnectError}.

netty/src/main/java/io/grpc/netty/NettyClientTransport.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,11 +350,6 @@ public void operationComplete(ChannelFuture future) throws Exception {
350350

351351
@Override
352352
public void shutdown(Status reason) {
353-
shutdown(reason, SimpleDisconnectError.SUBCHANNEL_SHUTDOWN);
354-
}
355-
356-
@Override
357-
public void shutdown(Status reason, DisconnectError disconnectError) {
358353
// start() could have failed
359354
if (channel == null) {
360355
return;

okhttp/src/main/java/io/grpc/okhttp/OkHttpClientTransport.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -987,18 +987,13 @@ int getOverridenPort() {
987987

988988
@Override
989989
public void shutdown(Status reason) {
990-
shutdown(reason, SimpleDisconnectError.SUBCHANNEL_SHUTDOWN);
991-
}
992-
993-
@Override
994-
public void shutdown(Status reason, DisconnectError disconnectError) {
995990
synchronized (lock) {
996991
if (goAwayStatus != null) {
997992
return;
998993
}
999994

1000995
goAwayStatus = reason;
1001-
listener.transportShutdown(goAwayStatus, disconnectError);
996+
listener.transportShutdown(goAwayStatus, SimpleDisconnectError.SUBCHANNEL_SHUTDOWN);
1002997
stopIfNecessary();
1003998
}
1004999
}
@@ -1010,7 +1005,7 @@ public void shutdownNow(Status reason) {
10101005

10111006
@Override
10121007
public void shutdownNow(Status reason, DisconnectError disconnectError) {
1013-
shutdown(reason, disconnectError);
1008+
shutdown(reason);
10141009
synchronized (lock) {
10151010
Iterator<Map.Entry<Integer, OkHttpClientStream>> it = streams.entrySet().iterator();
10161011
while (it.hasNext()) {

0 commit comments

Comments
 (0)