(b []byte)
| 4499 | } |
| 4500 | |
| 4501 | func (c *prefixConn) Read(b []byte) (n int, err error) { |
| 4502 | if !c.prefixConsumed && len(c.prefixData) > 0 { |
| 4503 | n = copy(b, c.prefixData) |
| 4504 | c.prefixData = c.prefixData[n:] |
| 4505 | c.prefixConsumed = len(c.prefixData) == 0 |
| 4506 | return n, nil |
| 4507 | } |
| 4508 | return c.Conn.Read(b) |
| 4509 | } |
| 4510 | |
| 4511 | // https://github.com/jackc/pgx/issues/1920 |
| 4512 | func TestFatalErrorReceivedInPipelineMode(t *testing.T) { |
no outgoing calls
no test coverage detected