diff options
| author | Fuwn <[email protected]> | 2025-05-24 03:28:14 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-05-24 03:28:14 -0700 |
| commit | 388181c0250f1eb1e1c782ed07f2da4b927e9124 (patch) | |
| tree | c350f2ba73e5c7f53bfede86a97cd36241c3cf5b | |
| parent | 11675972de7e3cf10d11470fc736ec78aa00ee18 (diff) | |
| download | gigi-388181c0250f1eb1e1c782ed07f2da4b927e9124.tar.xz gigi-388181c0250f1eb1e1c782ed07f2da4b927e9124.zip | |
feat(gigi.go): Emit connection write errors
| -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) { |