diff options
| author | Fuwn <[email protected]> | 2025-05-24 10:28:14 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-05-24 10:28:14 +0000 |
| commit | 755296f60f60c4dbbc2a1b6222086e77b60aeb4b (patch) | |
| tree | f7fcff9ce51e7cbecd1937beb07483a60e0b9db1 /gigi.go | |
| parent | chore(flake): simplify flake (diff) | |
| download | gigi-755296f60f60c4dbbc2a1b6222086e77b60aeb4b.tar.xz gigi-755296f60f60c4dbbc2a1b6222086e77b60aeb4b.zip | |
feat(gigi.go): Emit connection write errors
Diffstat (limited to 'gigi.go')
| -rw-r--r-- | gigi.go | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -86,8 +86,11 @@ func handleConnection(connection net.Conn, mode int) { return } - connection.Write([]byte(fileContent)) - log.Printf("info: success: %s", bufferContent) + if _, connectionWriteError := connection.Write([]byte(fileContent)); connectionWriteError != nil { + log.Printf("warn: could not write to connection: %s", connectionWriteError.Error()) + } else { + log.Printf("info: success: %s", bufferContent) + } } func readFile(filename string) (string, error) { |