Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 2202b62

Browse files
committed
Remove bad local stream reference storage
Libchan reference ids unlike spdy IDs are only used remotely and increment by 1. Storing the locally generated id in the streams reference map causes a collision with remotely generated ids. Since the locally created streams are not referenced by incoming messages, only remote needs to be stored. Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
1 parent dbf3d8b commit 2202b62

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

spdy/session.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ func (s *Transport) createSubStream(parentID uint64) (*stream, error) {
159159
session: s,
160160
}
161161

162-
// TODO: Do not store reference
163-
s.streamC.L.Lock()
164-
s.streams[referenceID] = newStream
165-
s.streamC.L.Unlock()
162+
// TODO: hold reference to the newly created stream
163+
// for possible cleanup. This stream should not be put
164+
// in the streams maps which holds remotely created
165+
// streams and will can have reference id conflicts.
166166

167167
return newStream, nil
168168

0 commit comments

Comments
 (0)