Permalink
Browse files

Move it into the create method

  • Loading branch information...
1 parent ce31d9d commit 2c7d04c0b39f007d268644946f4791c5e7bda342 @authorNari authorNari committed Jan 25, 2013
Showing with 1 addition and 4 deletions.
  1. +1 −4 lib/spdy/protocol.rb
View
@@ -39,10 +39,6 @@ def build(opts = {})
self.header.flags = opts[:flags] || 0
self.header.stream_id = opts[:stream_id]
- if defined?(self.associated_to_stream_id)
- self.associated_to_stream_id = opts[:associated_to_stream_id]
- end
-
nv = SPDY::Protocol::NV.new
nv.create(opts[:headers])
@@ -87,6 +83,7 @@ class SynStream < BinData::Record
def create(opts = {})
build({:type => 1, :len => 10}.merge(opts))
+ self.associated_to_stream_id = opts.fetch(:associated_to_stream_id, 0)
end
end

0 comments on commit 2c7d04c

Please sign in to comment.