heroiclabs / nakama-java

Java client for the Nakama and Satori servers.
https://heroiclabs.com/docs/android-java-client-guide/
Apache License 2.0
33 stars 18 forks source link

Channel {0} was not shutdown properly!!! #48

Closed karan1213 closed 2 years ago

karan1213 commented 4 years ago

Sometimes, I get this exception and the app crashes.

2020-11-04 03:00:21.974 7426-7764/com.talke.dev E/io.grpc.l1.e1: *~*~*~ Channel {0} was not shutdown properly!!! ~*~*~*
        Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.
    java.lang.RuntimeException: ManagedChannel allocation site
        at io.grpc.l1.e1$a.<init>(ManagedChannelOrphanWrapper.java:94)
        at io.grpc.l1.e1.<init>(ManagedChannelOrphanWrapper.java:52)
        at io.grpc.l1.e1.<init>(ManagedChannelOrphanWrapper.java:43)
        at io.grpc.l1.b.a(AbstractManagedChannelImplBuilder.java:518)
        at com.heroiclabs.nakama.DefaultClient.<init>(DefaultClient.java:115)
        at com.heroiclabs.nakama.DefaultClient.<init>(DefaultClient.java:77)
mofirouz commented 4 years ago

Looks to me that your app is closing but you aren't closing the socket/grpc connection to the server. Do you know if this happens in a lifecycle function in your app?