BugFix: Fixed NPE when connection reached EOF