title: golang tcp socket does not send message after write immediately
body: <p>My GO version is 1.1.1</p>
  
  <p>the sever recieved messages after connection close, but NoDelay was setted.</p>
  
  <p>Is there something wrong</p>
  
  <pre><code>addr, _ := net.ResolveTCPAddr("tcp", "localhost:5432")
  conn, err := net.DialTCP("tcp", nil, addr)
  defer conn.Close()
  if err != nil {
      fmt.Println("connect fail")
      return
  }
  err = conn.SetNoDelay(true)
  if err != nil {
      fmt.Println(err.Error())
  }
  
  for {
      var message string
      _, err := fmt.Scanln(&amp;message)
      if err != nil &amp;&amp; err.Error() != "unexpected newline" {
          fmt.Println("input finished", err)
          break
      }
  
      if message == "" {
          fmt.Println("no input, end")
          break
      }
      // message = fmt.Sprintf("%s\n",message) 
      //fmt.Fprintf(conn, message) // send immediately but following message won't send any more
      conn.Write([]byte(message)) // won't send until connection close
  }
  </code></pre>