saucelabs/forwarder

martian: unexpected connection closed prematurely: EOF

Closed this issue · 0 comments

In 4474a8d we added io.EOF checking to isClosedConnError this introduced a side effect off io.EOF treated as an error.

When reading request it's legit for clients to disconnect (before sending anther request).
This case must be handled separately.

2023/10/31 14:14:14.143406 [INFO] waiting for connections to close
2023/10/31 14:14:14.143455 [DEBUG] connection closed prematurely: EOF
2023/10/31 14:14:14.143457 [DEBUG] closing connection: [::1]:55532
2023/10/31 14:14:14.143469 [INFO] all connections closed
2023/10/31 14:14:14.143483 [DEBUG] listener closed, returning
2023/10/31 14:14:14.143728 [DEBUG] accepted connection from [::1]:55534
2023/10/31 14:14:14.143749 [DEBUG] waiting for request: [::1]:55534
2023/10/31 14:14:14.145919 [INFO] closing down proxy
2023/10/31 14:14:14.145926 [INFO] waiting for connections to close
2023/10/31 14:14:14.145996 [DEBUG] connection closed prematurely: EOF
2023/10/31 14:14:14.146001 [DEBUG] closing connection: [::1]:55534
2023/10/31 14:14:14.146021 [INFO] all connections closed
2023/10/31 14:14:14.146041 [DEBUG] listener closed, returning
2023/10/31 14:14:14.146445 [DEBUG] accepted connection from [::1]:55536
2023/10/31 14:14:14.146465 [DEBUG] waiting for request: [::1]:55536
2023/10/31 14:14:14.147562 [INFO] closing down proxy
2023/10/31 14:14:14.147566 [INFO] waiting for connections to close
2023/10/31 14:14:14.147590 [DEBUG] connection closed prematurely: EOF
2023/10/31 14:14:14.147596 [DEBUG] closing connection: [::1]:55536
2023/10/31 14:14:14.147609 [INFO] all connections closed
2023/10/31 14:14:14.147623 [DEBUG] listener closed, returning
2023/10/31 14:14:14.147864 [DEBUG] accepted connection from [::1]:55538
2023/10/31 14:14:14.147880 [DEBUG] waiting for request: [::1]:55538
2023/10/31 14:14:14.148983 [INFO] closing down proxy
2023/10/31 14:14:14.148986 [INFO] waiting for connections to close
2023/10/31 14:14:14.148991 [DEBUG] connection closed prematurely: EOF
2023/10/31 14:14:14.148993 [DEBUG] closing connection: [::1]:55538
2023/10/31 14:14:14.149006 [INFO] all connections closed
2023/10/31 14:14:14.149018 [DEBUG] listener closed, returning