mirror of
https://github.com/statbate/special-pancake.git
synced 2026-08-11 03:12:42 +00:00
remove
This commit is contained in:
parent
03732ea80d
commit
249b30961f
4 changed files with 3 additions and 47 deletions
|
|
@ -3,8 +3,6 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
//"net/url"
|
||||
//"strconv"
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
|
|
@ -68,15 +66,6 @@ func announceCount() {
|
|||
}
|
||||
}
|
||||
|
||||
func reconnectRoom(workerData Info) {
|
||||
n := randInt(10, 30)
|
||||
fmt.Printf("Sleeping %d seconds...\n", n)
|
||||
time.Sleep(time.Duration(n) * time.Second)
|
||||
fmt.Println("reconnect:", workerData.room, workerData.Id, workerData.Auth, workerData.Proxy)
|
||||
workerData.Last = time.Now().Unix()
|
||||
startRoom(workerData)
|
||||
}
|
||||
|
||||
func xWorker(workerData Info, u url.URL) {
|
||||
|
||||
fmt.Println("Start", workerData.room, "room_id", workerData.Id, "auth", workerData.Auth, "proxy", workerData.Proxy)
|
||||
|
|
@ -152,11 +141,6 @@ func xWorker(workerData Info, u url.URL) {
|
|||
return
|
||||
}
|
||||
|
||||
//if input.Key == "" {
|
||||
// fmt.Println("no connectionKey", workerData.room, string(message))
|
||||
// return
|
||||
//}
|
||||
|
||||
if err = c.WriteMessage(websocket.TextMessage, []byte(`{"action":17, "auth":{"accessToken":"`+workerData.Auth+`"}}`)); err != nil {
|
||||
fmt.Println(err.Error(), workerData.room)
|
||||
return
|
||||
|
|
@ -168,13 +152,6 @@ func xWorker(workerData Info, u url.URL) {
|
|||
return
|
||||
}
|
||||
|
||||
//fmt.Println(`{"action":16, "connectionKey":"`+input.Key+`","connectionSerial": -1}`)
|
||||
|
||||
//if err = c.WriteMessage(websocket.TextMessage, []byte(`{"action":16, "connectionKey":"`+input.Key+`","connectionSerial": -1}`)); err != nil {
|
||||
// fmt.Println(err.Error(), workerData.room)
|
||||
// return
|
||||
//}
|
||||
|
||||
for _, im := range initMessages {
|
||||
if err = c.WriteMessage(websocket.TextMessage, []byte(im)); err != nil {
|
||||
fmt.Println(err.Error(), workerData.room)
|
||||
|
|
@ -195,9 +172,6 @@ func xWorker(workerData Info, u url.URL) {
|
|||
_, message, err := c.ReadMessage()
|
||||
if err != nil {
|
||||
fmt.Println(err.Error(), workerData.room)
|
||||
//if workerData.Income > 1 {
|
||||
// go reconnectRoom(workerData)
|
||||
//}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue