From e84db93eaf55c2364c39e36b5ef95d076e73eee3 Mon Sep 17 00:00:00 2001 From: Shingo INADA Date: Fri, 25 Oct 2019 04:05:07 +0900 Subject: [PATCH] update zproxy --- src/zproxy/main.go | 14 ++++++++------ src/zproxy/ps2io.go | 1 - src/zproxy/update.go | 5 ++++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/zproxy/main.go b/src/zproxy/main.go index 74a8858..5dd4b68 100644 --- a/src/zproxy/main.go +++ b/src/zproxy/main.go @@ -498,6 +498,14 @@ func (z *Zproxy) ServeBattle() error { case <-chFlush: lastSend = time.Now() pkt := proto.GetPacket() + { + data, seq, ack := svRudp.GetSendData() + pkt.Type = proto.MessageType_Battle.Enum() + pkt.BattleData = data + pkt.Seq = pb.Uint32(seq) + pkt.Ack = pb.Uint32(ack) + z.udpcl.SendPacketTo(pkt, z.svAddr) + } for _, rudpBuf := range p2pRudp { data, seq, ack := rudpBuf.GetSendData() pkt.Type = proto.MessageType_Battle.Enum() @@ -510,12 +518,6 @@ func (z *Zproxy) ServeBattle() error { } z.udpcl.SendPacketTo(pkt, addr) } - data, seq, ack := svRudp.GetSendData() - pkt.Type = proto.MessageType_Battle.Enum() - pkt.BattleData = data - pkt.Seq = pb.Uint32(seq) - pkt.Ack = pb.Uint32(ack) - z.udpcl.SendPacketTo(pkt, z.svAddr) proto.PutPacket(pkt) } } diff --git a/src/zproxy/ps2io.go b/src/zproxy/ps2io.go index a0dbbf5..609d829 100644 --- a/src/zproxy/ps2io.go +++ b/src/zproxy/ps2io.go @@ -40,7 +40,6 @@ func (sv *PS2Server) Listen(addr string) error { } sv.chNewConn <- &PS2Conn{conn} } - return nil } func (sv *PS2Server) Accept() <-chan *PS2Conn { diff --git a/src/zproxy/update.go b/src/zproxy/update.go index 48b687a..acf5621 100644 --- a/src/zproxy/update.go +++ b/src/zproxy/update.go @@ -12,7 +12,7 @@ import ( var ( // These variables are automatically assigned during release process. // `-s -w -X main.releaseVersion ={{.Version}} -X main.releaseCommit={{.ShortCommit}} -X main.releaseDate={{.Date}} - releaseVersion = "0.0.0" + releaseVersion = "local" releaseCommit = "local" releaseDate = "local" ) @@ -24,6 +24,9 @@ func printReleaseInfo() { } func doSelfUpdate() { + if releaseVersion == "local" { + return + } log.Println("アップデートチェックを行います") latest, found, err := selfupdate.DetectLatest("inada-s/zdxsv")