public Task GetStatus() { string connectionId = Context.ConnectionId; if (Context.Items.TryGetValue(connectionId, out object serverId)) { string id = (string)serverId; return(_factorioServerManager.RequestStatus(id)); } else { // todo log error. return(Task.FromResult(0)); } }