1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-26 10:43:44 +02:00

replace github.com/firstrow/tcp_server with github.com/eosswedenorg-go/tcp_server

This commit is contained in:
Henrik Hautakoski 2022-01-03 17:12:11 +01:00
parent 59bd699065
commit 3a4c827f8e
No known key found for this signature in database
GPG key ID: 608414D93E862CCD
3 changed files with 6 additions and 6 deletions

View file

@ -9,7 +9,7 @@ import (
"internal/eosapi"
"internal/utils"
"github.com/eosswedenorg-go/haproxy"
"github.com/firstrow/tcp_server"
"github.com/eosswedenorg-go/tcp_server"
)
// check_api - Validates head block time.
@ -144,7 +144,7 @@ func onTcpMessage(c *tcp_server.Client, args string) {
}
// Report status to HAproxy
c.Send(fmt.Sprintln(status))
c.WriteString(fmt.Sprintln(status))
c.Close()
}
@ -154,6 +154,6 @@ func onTcpMessage(c *tcp_server.Client, args string) {
func spawnTcpServer(addr string) {
server := tcp_server.New(addr)
server.OnNewMessage(onTcpMessage);
server.OnMessage(onTcpMessage)
server.Listen()
}