Skip to content

Conversation

@maciejmrozinski
Copy link

Following #83 (review)

Changes in Request, Response and tests

@maciejmrozinski maciejmrozinski changed the title Use Stream 0.5 event semantics Use Stream 0.5 events semantic Apr 28, 2017
Copy link
Member

@clue clue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for the high quality changes, this is really much appreciated! 🎉

Most of the changes LGTM, but afaict the Request::end() does not follow stream semantics yet. Does it make sense to address this as part of this PR? 👍

"react/stream": "0.4.*",
"react/dns": "^0.4",
"react/event-loop": "^0.4",
"react/stream": "^0.5|^0.6",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably also keep BC with 0.4 here.

}

$this->close($error);
public function handleClose()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably be marked @internal (see also others?) or we may even use close() as the event handler here.

{
$this->closeError(new \RuntimeException(
"Connection closed before receiving response"
));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👎 This should probably stay in the end handler. The end event will be emitted when the connection has ended, the close event will also be emitted if you explicitly call close() in which case this would not be considered an error.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants