Browse Source

Cleans up synCh when the initial window update fails.

James Phillips 8 years ago
parent
commit
59d161676d
1 changed files with 5 additions and 0 deletions
  1. 5 0
      session.go

+ 5 - 0
session.go

@@ -175,6 +175,11 @@ GET_ID:
 
 	// Send the window update to create
 	if err := stream.sendWindowUpdate(); err != nil {
+		select {
+		case <-s.synCh:
+		default:
+			s.logger.Printf("[ERR] aborted stream open without inflight syn semaphore")
+		}
 		return nil, err
 	}
 	return stream, nil