mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-28 16:15:57 -05:00
[mpd] Close connection for close command (#444)
This commit is contained in:
parent
4800f9943b
commit
dcc6fcf206
11
src/mpd.c
11
src/mpd.c
@ -4542,6 +4542,17 @@ mpd_read_cb(struct bufferevent *bev, void *ctx)
|
|||||||
{
|
{
|
||||||
evbuffer_add(output, "OK\n", 3);
|
evbuffer_add(output, "OK\n", 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (close_cmd)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Freeing the bufferevent closes the connection, if it was
|
||||||
|
* opened with BEV_OPT_CLOSE_ON_FREE.
|
||||||
|
* Since bufferevent is reference-counted, it will happen as
|
||||||
|
* soon as possible, not necessarily immediately.
|
||||||
|
*/
|
||||||
|
bufferevent_free(bev);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user