summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/main.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/server/main.go b/server/main.go
index 66063c9..1b9f399 100644
--- a/server/main.go
+++ b/server/main.go
@@ -221,8 +221,14 @@ func CopyLoop(left net.Conn, right net.Conn) error {
}
// XXX better to defer?
- left.Close()
- right.Close()
+ err := left.Close()
+ if err != nil {
+ fmt.Fprintln(os.Stderr, "error closing left connection: ", err.Error())
+ }
+ err = right.Close()
+ if err != nil {
+ fmt.Fprintln(os.Stderr, "error closing right connection: ", err.Error())
+ }
return copyErr
}