mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-22 23:58:02 -05:00
Fix network api throwing on client/server query disconnects
This commit is contained in:
parent
f08a69e19f
commit
74330c9e99
3 changed files with 5 additions and 3 deletions
|
@ -19,7 +19,7 @@ plugins {
|
||||||
def ENV = System.getenv()
|
def ENV = System.getenv()
|
||||||
|
|
||||||
class Globals {
|
class Globals {
|
||||||
static def baseVersion = "0.34.2"
|
static def baseVersion = "0.34.3"
|
||||||
static def mcVersion = "21w18a"
|
static def mcVersion = "21w18a"
|
||||||
static def yarnVersion = "+build.3"
|
static def yarnVersion = "+build.3"
|
||||||
static def loaderVersion = "0.10.5+build.213"
|
static def loaderVersion = "0.10.5+build.213"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
archivesBaseName = "fabric-networking-api-v1"
|
archivesBaseName = "fabric-networking-api-v1"
|
||||||
version = getSubprojectVersion(project, "1.0.8")
|
version = getSubprojectVersion(project, "1.0.9")
|
||||||
|
|
||||||
moduleDependencies(project, [
|
moduleDependencies(project, [
|
||||||
'fabric-api-base'
|
'fabric-api-base'
|
||||||
|
|
|
@ -85,7 +85,9 @@ abstract class ClientConnectionMixin implements ChannelInfoHolder {
|
||||||
|
|
||||||
@Inject(method = "channelInactive", at = @At("HEAD"))
|
@Inject(method = "channelInactive", at = @At("HEAD"))
|
||||||
private void handleDisconnect(ChannelHandlerContext channelHandlerContext, CallbackInfo ci) throws Exception {
|
private void handleDisconnect(ChannelHandlerContext channelHandlerContext, CallbackInfo ci) throws Exception {
|
||||||
((NetworkHandlerExtensions) packetListener).getAddon().handleDisconnect();
|
if (packetListener instanceof NetworkHandlerExtensions) { // not the case for client/server query
|
||||||
|
((NetworkHandlerExtensions) packetListener).getAddon().handleDisconnect();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue