Browse Source

server_test: don't crash in serverTesters.Close if using optOnlyServer

Brad Fitzpatrick 11 years ago
parent
commit
e12a06aa74
1 changed files with 3 additions and 1 deletions
  1. 3 1
      server_test.go

+ 3 - 1
server_test.go

@@ -164,7 +164,9 @@ func (st *serverTester) streamState(id uint32) streamState {
 
 func (st *serverTester) Close() {
 	st.ts.Close()
-	st.cc.Close()
+	if st.cc != nil {
+		st.cc.Close()
+	}
 	log.SetOutput(os.Stderr)
 }