Skip to content

Commit

Permalink
Forces frame type consistency by implementing Frame with pointers only
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiraux committed Apr 8, 2020
1 parent 23a5ff4 commit 3627a1e
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 97 deletions.
4 changes: 2 additions & 2 deletions agents/stream_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (a *StreamAgent) reset(streamId uint64, appErrorCode uint64) error {
}
s.WriteCloseOffset = s.WriteOffset
s.WriteClosed = true
a.conn.FrameQueue.Submit(QueuedFrame{ResetStream{streamId, appErrorCode, s.WriteOffset}, EncryptionLevelBestAppData})
a.conn.FrameQueue.Submit(QueuedFrame{&ResetStream{streamId, appErrorCode, s.WriteOffset}, EncryptionLevelBestAppData})
return nil
}
return errors.New("cannot reset server uni stream")
Expand All @@ -107,7 +107,7 @@ func (a *StreamAgent) stopSending(streamId uint64, appErrorCode uint64) error {
if _, present := a.conn.Streams.Has(streamId); !present && IsServer(streamId) {
return errors.New("cannot ask to stop sending on non-ready server stream")
}
a.conn.FrameQueue.Submit(QueuedFrame{StopSendingFrame{streamId, appErrorCode}, EncryptionLevelBestAppData})
a.conn.FrameQueue.Submit(QueuedFrame{&StopSendingFrame{streamId, appErrorCode}, EncryptionLevelBestAppData})
return nil
}
return errors.New("cannot ask to stop sending on a client uni stream")
Expand Down
Loading

0 comments on commit 3627a1e

Please sign in to comment.