mirror of
https://github.com/mpv-player/mpv
synced 2024-12-26 09:02:38 +00:00
ipc-unix: don't blow up on readonly fd://
On my system, when trying to use mpv with a read-only fd created by python 3.7, `send` triggers ENOTSOCK, not EBADF. Extend the logic to detect non-writable fds by this `errno`.
This commit is contained in:
parent
6f0ed8e0b2
commit
880c59d189
@ -73,7 +73,7 @@ static int ipc_write_str(struct client_arg *client, const char *buf)
|
||||
if (rc == 0)
|
||||
return -1;
|
||||
|
||||
if (errno == EBADF) {
|
||||
if (errno == EBADF || errno == ENOTSOCK) {
|
||||
client->writable = false;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user