Browse Source

Remove some redundant goroutine checks. writeFrameFromHandler does these.

Brad Fitzpatrick 11 years ago
parent
commit
66ec4396ff
1 changed files with 0 additions and 3 deletions
  1. 0 3
      server.go

+ 0 - 3
server.go

@@ -546,7 +546,6 @@ func (sc *serverConn) readPreface() error {
 // the total amount of bytes waiting to be sent and can can have more
 // the total amount of bytes waiting to be sent and can can have more
 // scheduling decisions available.
 // scheduling decisions available.
 func (sc *serverConn) writeData(stream *stream, data *dataWriteParams, ch chan error) error {
 func (sc *serverConn) writeData(stream *stream, data *dataWriteParams, ch chan error) error {
-	sc.serveG.checkNotOn() // NOT on; otherwise could deadlock in sc.writeFrame
 	sc.writeFrameFromHandler(frameWriteMsg{
 	sc.writeFrameFromHandler(frameWriteMsg{
 		write:     writeDataFrame,
 		write:     writeDataFrame,
 		cost:      uint32(len(data.p)),
 		cost:      uint32(len(data.p)),
@@ -1271,7 +1270,6 @@ func (sc *serverConn) writeHeaders(req headerWriteReq, tempCh chan error) {
 
 
 // called from handler goroutines.
 // called from handler goroutines.
 func (sc *serverConn) write100ContinueHeaders(st *stream) {
 func (sc *serverConn) write100ContinueHeaders(st *stream) {
-	sc.serveG.checkNotOn() // NOT
 	sc.writeFrameFromHandler(frameWriteMsg{
 	sc.writeFrameFromHandler(frameWriteMsg{
 		write:  write100ContinueHeadersFrame,
 		write:  write100ContinueHeadersFrame,
 		v:      st,
 		v:      st,
@@ -1281,7 +1279,6 @@ func (sc *serverConn) write100ContinueHeaders(st *stream) {
 
 
 // called from handler goroutines
 // called from handler goroutines
 func (sc *serverConn) sendWindowUpdate(st *stream, n int) {
 func (sc *serverConn) sendWindowUpdate(st *stream, n int) {
-	sc.serveG.checkNotOn() // NOT
 	if st == nil {
 	if st == nil {
 		panic("no stream")
 		panic("no stream")
 	}
 	}