Fixed PHP-1082: CommandCursor segfaults when server is closed