(p []byte)
| 170 | } |
| 171 | |
| 172 | func (fc *flakyConn) Write(p []byte) (int, error) { |
| 173 | if time.Now().After(fc.closeAt) { |
| 174 | return 0, fmt.Errorf("flaky connection closed") |
| 175 | } |
| 176 | return len(p), nil |
| 177 | } |
| 178 | |
| 179 | func wsFlakyEndpoint(w ResponseWriter, r *http.Request) error { |
| 180 | resp := &http.Response{ |