mirror of
https://github.com/statbate/shiny-potato.git
synced 2026-08-11 03:12:42 +00:00
update
This commit is contained in:
parent
06f4b6c002
commit
e55475d944
1 changed files with 5 additions and 5 deletions
10
app/main.go
10
app/main.go
|
|
@ -28,10 +28,10 @@ var (
|
||||||
|
|
||||||
json = jsoniter.ConfigCompatibleWithStandardLibrary
|
json = jsoniter.ConfigCompatibleWithStandardLibrary
|
||||||
|
|
||||||
socketServer = make(chan []byte, 100)
|
socketServer = make(chan []byte, 1)
|
||||||
|
|
||||||
save = make(chan saveData, 100)
|
save = make(chan saveData, 1)
|
||||||
slog = make(chan saveLog, 100)
|
slog = make(chan saveLog, 32)
|
||||||
|
|
||||||
rooms = &Rooms{
|
rooms = &Rooms{
|
||||||
Count: make(chan int),
|
Count: make(chan int),
|
||||||
|
|
@ -99,8 +99,8 @@ func socketHandler() {
|
||||||
select {
|
select {
|
||||||
case b := <-socketServer:
|
case b := <-socketServer:
|
||||||
|
|
||||||
if conn == nil {
|
if conn == nil || conn.RemoteAddr() == nil {
|
||||||
conn, err = net.Dial("unix", "/tmp/echo.sock")
|
conn, err = net.DialTimeout("unix", "/tmp/echo.sock", time.Millisecond * 10)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err.Error())
|
fmt.Println(err.Error())
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue