commit - bbf64a33d64e1439e0885e6faedfb006a0616fe9
commit + 63f5223a7eb5d82638a680e8b83bb734360c1b26
blob - d23abdc375312342f7b954ac84cb5902f0dc9b87
blob + ab861362cf2454ff1c6b8747c681a37bdb870959
--- player.c
+++ player.c
static struct imsgbuf *ibuf;
+static int got_stop;
static int nextfd = -1;
static char nextpath[PATH_MAX];
fatalx("expected at least a message");
ret = imsg.hdr.type;
+ if (ret == IMSG_STOP)
+ got_stop = 1;
switch (imsg.hdr.type) {
case IMSG_PLAY:
player_enqueue(&imsg);
player_dispatch();
player_playnext();
- player_sendeof();
+
+ if (!got_stop)
+ player_sendeof();
+ else
+ got_stop = 0;
}
return 0;