Skip to content

Commit 812a11d

Browse files
author
Jonas Dellinger
authored
Merge pull request #107 from petrroll/asyncShouldReturnTask
Async methods return Tasks instead of void.
2 parents dd2b392 + 3e7265a commit 812a11d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

SpotifyAPI/Local/RemoteHandler.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@ internal Boolean Init()
2222
return !string.IsNullOrEmpty(CfidKey);
2323
}
2424

25-
internal async void SendPauseRequest()
25+
internal async Task SendPauseRequest()
2626
{
2727
await QueryAsync("remote/pause.json?pause=true", true, true, -1);
2828
}
2929

30-
internal async void SendPlayRequest()
30+
internal async Task SendPlayRequest()
3131
{
3232
await QueryAsync("remote/pause.json?pause=false", true, true, -1);
3333
}
3434

35-
internal async void SendPlayRequest(string url, string context = "")
35+
internal async Task SendPlayRequest(string url, string context = "")
3636
{
3737
// TODO: instead of having an empty context, one way to fix the bug with the playback time beyond the length of a song would be to provide a 1-song context, and it would be fixed.
3838
await QueryAsync($"remote/play.json?uri={url}&context={context}", true, true, -1);
3939
}
4040

41-
internal async void SendQueueRequest(string url)
41+
internal async Task SendQueueRequest(string url)
4242
{
4343
await QueryAsync("remote/play.json?uri=" + url + "?action=queue", true, true, -1);
4444
}

0 commit comments

Comments
 (0)