added changes to allow https servers to broadcast availability
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
@@ -192,7 +193,6 @@ func Server(port string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func CheckIfGameSessionIsActiveOrRemove(gorm *gorm.DB) {
|
func CheckIfGameSessionIsActiveOrRemove(gorm *gorm.DB) {
|
||||||
fmt.Println("here")
|
|
||||||
for {
|
for {
|
||||||
time.Sleep(2 * time.Second)
|
time.Sleep(2 * time.Second)
|
||||||
Gamesessions, err := DisplayGameSessions(gorm)
|
Gamesessions, err := DisplayGameSessions(gorm)
|
||||||
@@ -200,6 +200,7 @@ func CheckIfGameSessionIsActiveOrRemove(gorm *gorm.DB) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
|
||||||
for i, _ := range Gamesessions {
|
for i, _ := range Gamesessions {
|
||||||
req, err := http.NewRequest("GET", Gamesessions[i].Link, nil)
|
req, err := http.NewRequest("GET", Gamesessions[i].Link, nil)
|
||||||
// Sending request to the backend server
|
// Sending request to the backend server
|
||||||
|
|||||||
Reference in New Issue
Block a user