Skip to content

Commit

Permalink
Comments edited
Browse files Browse the repository at this point in the history
  • Loading branch information
ayuryshev committed Jun 5, 2019
1 parent 7c7f644 commit 7dabb5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/transport/managed_transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ func (tr *ManagedTransport) Write(p []byte) (n int, err error) {
return
}

// killWorker sends signal to Manager.manageTransport goroutine to exit
// it's safe to call it multiple times
func (tr *ManagedTransport) killWorker() {
select {
case <-tr.doneChan:
Expand Down
2 changes: 1 addition & 1 deletion pkg/transport/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (tm *Manager) Serve(ctx context.Context) error {
// MakeTransportID generates uuid.UUID from pair of keys + type + public
// Generated uuid is:
// - always the same for a given pair
// - GenTransportUUID(keyA,keyB) == GenTransportUUID(keyB, keyA)
// - MakeTransportUUID(keyA,keyB) == MakeTransportUUID(keyB, keyA)
func MakeTransportID(keyA, keyB cipher.PubKey, tpType string, public bool) uuid.UUID {
keys := SortPubKeys(keyA, keyB)
if public {
Expand Down

0 comments on commit 7dabb5f

Please sign in to comment.