([]byte)
| 378 | } |
| 379 | |
| 380 | func (cn *badConn) Write([]byte) (int, error) { |
| 381 | if cn.writeDelay != 0 { |
| 382 | time.Sleep(cn.writeDelay) |
| 383 | } |
| 384 | if cn.writeErr != nil { |
| 385 | return 0, cn.writeErr |
| 386 | } |
| 387 | return 0, badConnError("bad connection") |
| 388 | } |
| 389 | |
| 390 | //------------------------------------------------------------------------------ |
| 391 |
no test coverage detected