Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client that waits long time gets SocketError broken pipe Or ConnectionError exception #55

Closed
pcwalden opened this issue May 1, 2015 · 2 comments

Comments

@pcwalden
Copy link

pcwalden commented May 1, 2015

I am new to python and python-mpd2 so I may be using this package incorrectly, but I cannot determine the source of my problem. I have a python-mpd2-based client on one RaspberryPi and a standard mpd on another Pi.

My client connects to the remote mpd and then listens for IR remote commands. When the IR remote command is sent, the client formats the request and relays it to the mpd. So far I have volume up and down working nicely. The client never disconnects and supposedly keeps the connection to the mpd open all the while.

However, if I leave the client for a period of time (an hour or so), just listening for IR commands, when I finally send a command, the client fails with a broken pipe (socket.error?) or sometimes a "ConnectionError: Connection lost while reading line". The mpd is still running and playing, although another mpd client (mpc) elsewhere has been been manipulating it.

Is it normal to expect that the original socket connection would be dropped over time or usage by a different mpd client? I have read all the documents I can find, and have failed to find any reason for the problem. I am expecting to have to catch the error and re-connect, but I'd like to know the root cause.

@Mic92 Mic92 added the duplicate label May 1, 2015
@Mic92
Copy link
Owner

Mic92 commented May 1, 2015

Duplicate of #31

MPD closes connection after a certain timeout

@Mic92 Mic92 closed this as completed May 1, 2015
@pcwalden
Copy link
Author

pcwalden commented May 1, 2015

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants