Skip to content

Commit

Permalink
chore: add a single message to signal server
Browse files Browse the repository at this point in the history
  • Loading branch information
braginini committed Apr 19, 2021
1 parent 88f495a commit b6f4566
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions signal/signal.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ func NewServer() *SignalExchangeServer {

func (s *SignalExchangeServer) Connect(ctx context.Context, msg *proto.Message) (*proto.Message, error) {

if _, found := s.registry.Peers[msg.Key]; found {
return &proto.Message{}, nil
if _, found := s.registry.Peers[msg.Key]; !found {
return nil, fmt.Errorf("unknown peer %s", msg.Key)
}

if dstPeer, found := s.registry.Peers[msg.RemoteKey]; found {
Expand Down

0 comments on commit b6f4566

Please sign in to comment.