Skip to content

Commit

Permalink
revert test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayrat Hudaygulov committed Jun 2, 2020
1 parent 41afea0 commit 9bec397
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/Grinder/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -166,22 +166,21 @@ module Program =
}
startBot botConfiguration (onUpdate settings (createBotApi botConfiguration settings) dataApi) None
|> Async.Start

printfn "Bot started"

Thread.Sleep -1
// Needed for azure web app deploy check. We have to response with anything on port 80
use listener = new HttpListener()
listener.Prefixes.Add("http://*:80/")
listener.Start()

let buffer = System.Text.Encoding.UTF8.GetBytes "OK"

// use listener = new HttpListener()
// listener.Prefixes.Add("http://*:80/")
// listener.Start()
//
// let buffer = System.Text.Encoding.UTF8.GetBytes "OK"
//
// while true do
// let ctx = listener.GetContext()
// let output = ctx.Response.OutputStream
// output.Write(buffer, 0, buffer.Length)
// output.Close();
while true do
let ctx = listener.GetContext()
let output = ctx.Response.OutputStream
output.Write(buffer, 0, buffer.Length)
output.Close();

printfn "Bot exited"
0 // return an integer exit code

0 comments on commit 9bec397

Please sign in to comment.