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

network: Respond to messages before closing connections #722

Merged
merged 1 commit into from May 6, 2014

Conversation

3 participants
@trygveaa
Member

trygveaa commented Apr 25, 2014

Now, a connection is closed immediately if it can't receive more messages from the client. If some messages are received, but not processed yet, and they want to respond to the client, this fails. The client never gets the response, because the connection has been closed.

This makes a connection tell the actor to stop the connection, instead of stopping it itself. That means that first, the messages that hasn't been processed yet, will be processed. After that, the connection will be closed.

E.g. it makes this work:

$ echo status | nc localhost 6600
network: Respond to messages before closing connections
This makes a connection tell the actor to stop the connection, instead
of stopping it itself. This is preferable, because other messages sent
to the actor that is not processed yet, may now send data to the client.

E.g. it makes this work:
$ echo status | nc localhost 6600
@jodal

This comment has been minimized.

Member

jodal commented May 6, 2014

Looks good to me.

@adamcik Any comments?

@jodal jodal added Core and removed Core labels May 6, 2014

@jodal jodal added this to the v0.19 - MPD playlist mgmt and other MPD improvements milestone May 6, 2014

@jodal jodal assigned adamcik and jodal and unassigned adamcik May 6, 2014

jodal added a commit that referenced this pull request May 6, 2014

Merge pull request #722 from trygveaa/develop
network: Respond to messages before closing connections

@jodal jodal merged commit 9d4bcf2 into mopidy:develop May 6, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@jodal

This comment has been minimized.

Member

jodal commented May 6, 2014

Thanks :-)

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