fix: Allow reply on Gitlab buffer (#375)
Fixes issue where we were blocking reply creation due to a recent update This is a #PATCH release
This commit is contained in:
committed by
GitHub
parent
dba15127fe
commit
c3d7f26e3c
@@ -233,17 +233,14 @@ func CreateRouter(gitlabClient *Client, projectInfo *ProjectInfo, s *shutdownSer
|
||||
withMethodCheck(http.MethodPost),
|
||||
))
|
||||
|
||||
m.Handle("/ping", http.HandlerFunc(pingHandler))
|
||||
m.HandleFunc("/ping", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
fmt.Fprintln(w, "pong")
|
||||
})
|
||||
|
||||
return LoggingServer{handler: m}
|
||||
}
|
||||
|
||||
/* Used to check whether the server has started yet */
|
||||
func pingHandler(w http.ResponseWriter, _ *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
fmt.Fprintln(w, "pong")
|
||||
}
|
||||
|
||||
/* checkServer pings the server repeatedly for 1 full second after startup in order to notify the plugin that the server is ready */
|
||||
func checkServer(port int) error {
|
||||
for i := 0; i < 10; i++ {
|
||||
|
||||
Reference in New Issue
Block a user