Ignore players that have logged out and have not been injected.

This commit is contained in:
Kristian S. Stangeland 2013-03-17 23:55:08 +01:00
parent da0bcaa482
commit 310fd18e89
2 changed files with 11 additions and 0 deletions

View File

@ -7,6 +7,12 @@
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/ProtocolLib"/> <classpathentry combineaccessrules="false" kind="src" path="/ProtocolLib"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>

View File

@ -537,6 +537,11 @@ class ProxyPlayerInjectionHandler implements PlayerInjectionHandler {
if (injector == null) { if (injector == null) {
// Try getting it from the player itself // Try getting it from the player itself
SocketAddress address = player.getAddress(); SocketAddress address = player.getAddress();
// Must have logged out - there's nothing we can do
if (address == null)
return null;
// Look that up without blocking // Look that up without blocking
SocketInjector result = inputStreamLookup.peekSocketInjector(address); SocketInjector result = inputStreamLookup.peekSocketInjector(address);