diff options
Diffstat (limited to 'lib/socket.go')
-rw-r--r-- | lib/socket.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/socket.go b/lib/socket.go index d5db3dc1..cdf0f737 100644 --- a/lib/socket.go +++ b/lib/socket.go @@ -61,10 +61,11 @@ func (as *AercServer) handleClient(conn net.Conn) { for scanner.Scan() { conn.SetDeadline(time.Now().Add(1 * time.Minute)) msg := scanner.Text() + as.logger.Printf("unix:%d: got message %s", clientId, msg) if !strings.ContainsRune(msg, ':') { conn.Write([]byte("error: invalid command\n")) + continue } - as.logger.Printf("unix:%d: got message %s", clientId, msg) prefix := msg[:strings.IndexRune(msg, ':')] switch prefix { case "mailto": |