1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-17 18:26:57 +00:00

Close the connection if we get corrupted commands.

This commit is contained in:
Kane York 2015-11-19 16:55:03 -08:00
parent cf238bf650
commit 62c9659430
4 changed files with 23 additions and 9 deletions

View file

@ -141,19 +141,19 @@ func TCheckResponse(tb testing.TB, resp *http.Response, expected string, desc st
}
type TURLs struct {
Websocket string
Origin string
Websocket string
Origin string
UncachedPubMsg string // uncached_pub
SavePubMsg string // cached_pub
SavePubMsg string // cached_pub
}
func TGetUrls(testserver *httptest.Server) TURLs {
addr := testserver.Listener.Addr().String()
return TURLs{
Websocket: fmt.Sprintf("ws://%s/", addr),
Origin: fmt.Sprintf("http://%s", addr),
UncachedPubMsg: fmt.Sprintf("http://%s/uncached_pub", addr),
SavePubMsg: fmt.Sprintf("http://%s/cached_pub", addr),
Websocket: fmt.Sprintf("ws://%s/", addr),
Origin: fmt.Sprintf("http://%s", addr),
UncachedPubMsg: fmt.Sprintf("http://%s/uncached_pub", addr),
SavePubMsg: fmt.Sprintf("http://%s/cached_pub", addr),
}
}