Skip to content

Commit

Permalink
Add getMetadata to connection interface
Browse files Browse the repository at this point in the history
  • Loading branch information
junbeomlee committed Sep 22, 2018
1 parent 1b2a40b commit 5faee3f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (s Server) BifrostStream(streamServer pb.StreamService_BifrostStreamServer)
_, cf := context.WithCancel(context.Background())
streamWrapper := bifrost.NewServerStreamWrapper(streamServer, cf)

pub, metaData, err := handShake(streamWrapper, s.pubKey)
pub, metaData, err := s.handShake(streamWrapper, s.pubKey)

if err != nil {
return err
Expand All @@ -53,7 +53,7 @@ func (s Server) BifrostStream(streamServer pb.StreamService_BifrostStreamServer)
return nil
}

func handShake(streamWrapper bifrost.StreamWrapper, pubKey key.PubKey) (key.PubKey, map[string]string, error) {
func (s Server) handShake(streamWrapper bifrost.StreamWrapper, pubKey key.PubKey) (key.PubKey, map[string]string, error) {

err := requestInfo(streamWrapper)

Expand All @@ -69,7 +69,7 @@ func handShake(streamWrapper bifrost.StreamWrapper, pubKey key.PubKey) (key.PubK
return nil, nil, err
}

err = sendInfo(streamWrapper, pubKey, metaData)
err = sendInfo(streamWrapper, pubKey, s.metaData)

if err != nil {
streamWrapper.Close()
Expand Down

0 comments on commit 5faee3f

Please sign in to comment.