Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uaparser go binary update #9

Merged
merged 1 commit into from
Feb 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
uaparser go binary update
- Update the socket server to return exit status 1 in case of failure.
  • Loading branch information
root committed Feb 2, 2021
commit ee3b905f29ebc3f3d419f54a23558ca2489e85d8
2 changes: 1 addition & 1 deletion plugins/filter_apm_uaparser/filter_uaparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static int get_agent_info(char *agent, int port, msgpack_packer *packer)
continue;
}
valread = recv(sock, buffer, 1024, 0);
} while (valread == 0 && retryCounter <= GLOBALRETRIES);
} while (valread == 0);
}

entry = strtok(buffer, "}");
Expand Down
4 changes: 4 additions & 0 deletions ua-parser/uaparser/socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"bufio"
"context"
"net"
"os"
"strconv"
)

Expand All @@ -23,6 +24,8 @@ func socketServer(ctx context.Context, port int) {
l, err := net.Listen(connType, connHost+":"+strconv.Itoa(port))
if err != nil {
Log.Printf("[UA Parser] Error listening:%v", err.Error())
os.Stderr.WriteString(err.Error())
os.Exit(1)
return
}
defer l.Close()
Expand Down Expand Up @@ -83,3 +86,4 @@ func receiveAgent(conn net.Conn, agentChan chan []byte, closeChan chan bool) {
}
agentChan <- buffer
}

Binary file modified ua-parser/uaparser/uaparser
Binary file not shown.