Skip to content

Commit

Permalink
FIX : Download the stream in the matching window
Browse files Browse the repository at this point in the history
  • Loading branch information
NSV committed Sep 17, 2018
1 parent 972eb9d commit 80d7a3e
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,15 @@ public PObject getObject(final int objectID) {
* the stream handler
*/
public void stackStreamRequest(final StreamHandler streamListener) {
stackStreamRequest(streamListener, PWindow.getMain());
}

public void stackStreamRequest(final StreamHandler streamListener, final PWindow window) {
final int streamRequestID = nextStreamRequestID();

final ModelWriter writer = Txn.get().getWriter();
writer.beginObject();
if (!PWindow.isMain(window)) writer.write(ServerToClientModel.WINDOW_ID, window.getID());
writer.write(ServerToClientModel.TYPE_ADD_HANDLER, -1);
writer.write(ServerToClientModel.HANDLER_TYPE, HandlerModel.HANDLER_STREAM_REQUEST.getValue());
writer.write(ServerToClientModel.STREAM_REQUEST_ID, streamRequestID);
Expand Down

0 comments on commit 80d7a3e

Please sign in to comment.