diff options
author | wm4 <wm4@nowhere> | 2014-12-24 13:18:00 +0100 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-01-25 17:00:14 +0900 |
commit | 37210f0cbc1c00a06a4e84dfabb55e1046e6182c (patch) | |
tree | 8cf9a8d5177aafb0b8f500a2d0885da52f1fd313 /wscript_build.py | |
parent | f24b8cbd47a9e75c635b1537aff16de18d350021 (diff) | |
download | mpv-37210f0cbc1c00a06a4e84dfabb55e1046e6182c.tar.bz2 mpv-37210f0cbc1c00a06a4e84dfabb55e1046e6182c.tar.xz |
ipc: report some user errors better
Using the IPC with a program, it's not often obvious that a newline must
be sent to terminate a command. Print a warning if the connection is
closed while there is still uninterpreted data in the buffer.
Print the OS reported error if reading/writing the socket fails. Print
an erro if JSON parsing fails.
I considered silencing write errors if the write end is closed (EPIPE),
because a client might send a bunch of commands, and then close the
socket without wanting to read the reply. But then, mpv disconnects
without reading further commands that might still be buffered, so it's
probably a good idea to always print the error.
Diffstat (limited to 'wscript_build.py')
0 files changed, 0 insertions, 0 deletions