-
Notifications
You must be signed in to change notification settings - Fork 9
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
CP-1743 Read remaining data from request buffer on xhr close #10
Conversation
}); | ||
xo.onFinish.listen((e) { | ||
dispatch(new StatusEvent("chunk", e.status, e.text)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this event doesn't make sense, the XHRObject is the only one who should be emitting chunk events. The receiver should only emits CloseEvents ands MessageEvents. No one would even be listening to this.
+1 Looks good |
+1 |
1 similar comment
+1 |
+10 - Dave walked me through reproducing the error; don't see it any more with these changes! |
@jayudey-wf ready for merge |
@@ -7,4 +7,5 @@ before_install: | |||
- sh -e /etc/init.d/xvfb start | |||
script: | |||
- npm install | |||
- pub run dart_dev test --unit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unit tests should be run be default in dart_dev I believe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought so too, but didn't see them being run in the CI output for commit f235d0c
https://travis-ci.org/Workiva/sockjs-dart-client/builds/129480139
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well then disregard my comment, sorry david
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They might have just gotten swallowed by the integration tests since they take a bit longer. There are 21 integration tests and you added 2 tests, and that CI run had 23 passing tests, so I think they're running.
Just a couple of small things, tests look good thanks for adding those! |
+1 |
1 similar comment
+1 |
QA Resource Approval: +10
Merging into master. |
PROBLEM
On chrome when the HttpRequest's state is changed to DONE the onReadyStateChange event is fired when there is still unread data in the requests response buffer.
SOLUTION
When the onFinish handler is called in the xhr receiver read and dispatch any pending messages still in the buffer
CODE REVIEW
@trentgrover-wf
@maxwellpeterson-wf
@dustinlessard-wf
@jayudey-wf
@grantnelson-wf
@nathanevans-wf