]> Cypherpunks.ru repositories - govpn.git/commitdiff
Skip heartbeat packets that can appear during rehandshake period
authorSergey Matveev <stargrave@stargrave.org>
Sun, 15 Mar 2015 15:53:48 +0000 (18:53 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sun, 15 Mar 2015 15:53:48 +0000 (18:53 +0300)
Signed-off-by: Sergey Matveev <stargrave@stargrave.org>
cmd/govpn-client/main.go

index e358d43f8b82dad67ad9c6de2bfc4afeffbf3422..f4a29eb82d2aea2a23d3fdb5eaad906cf41e677d 100644 (file)
@@ -102,7 +102,9 @@ MainCycle:
                        break MainCycle
                case ethPkt = <-ethSink:
                        if peer == nil {
-                               ethReady <- struct{}{}
+                               if len(ethPkt) > 0 {
+                                       ethReady <- struct{}{}
+                               }
                                continue
                        }
                        peer.EthProcess(ethPkt, conn, ethReady)