diff options
author | J. Alexander Treuman <jat@spatialrift.net> | 2007-06-12 18:33:26 +0000 |
---|---|---|
committer | J. Alexander Treuman <jat@spatialrift.net> | 2007-06-12 18:33:26 +0000 |
commit | 8de17dbed0354e6e3475defec2fb046a559f1c47 (patch) | |
tree | d7390da47980dd5cb9c37438d8545baa3443438a /src/audioOutputs | |
parent | 6f2be4727064bf96c9cfa4622c144566b8c7d7cf (diff) | |
download | mpd-8de17dbed0354e6e3475defec2fb046a559f1c47.tar.gz mpd-8de17dbed0354e6e3475defec2fb046a559f1c47.tar.xz mpd-8de17dbed0354e6e3475defec2fb046a559f1c47.zip |
Use <= when comparing (current time - start time) to a timeout. This way
if the clock ticks right after we get the start time and the timeout is
only one second, we'll still wait a full second instead of returning
immediately.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6557 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/audioOutputs/audioOutput_shout.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/audioOutputs/audioOutput_shout.c b/src/audioOutputs/audioOutput_shout.c index 5444912c5..3bc8bb456 100644 --- a/src/audioOutputs/audioOutput_shout.c +++ b/src/audioOutputs/audioOutput_shout.c @@ -453,7 +453,7 @@ static int myShout_openShoutConn(AudioOutput * audioOutput) int state; if (sd->connAttempts != 0 && - (t - sd->lastAttempt) < CONN_ATTEMPT_INTERVAL) { + (t - sd->lastAttempt) <= CONN_ATTEMPT_INTERVAL) { return -1; } @@ -462,7 +462,7 @@ static int myShout_openShoutConn(AudioOutput * audioOutput) state = shout_open(sd->shoutConn); - while (state == SHOUTERR_BUSY && (t - sd->lastAttempt) < sd->timeout) { + while (state == SHOUTERR_BUSY && (t - sd->lastAttempt) <= sd->timeout) { my_usleep(10000); state = shout_get_connected(sd->shoutConn); t = time(NULL); |