fix
This commit is contained in:
parent
2beaecc533
commit
27cf425b48
3 changed files with 4 additions and 4 deletions
|
@ -101,7 +101,7 @@ func (p *Client) Run() {
|
|||
|
||||
go p.Accept()
|
||||
|
||||
recv := make(chan *Packet, 1000)
|
||||
recv := make(chan *Packet, 10000)
|
||||
go recvICMP(*p.conn, recv)
|
||||
|
||||
interval := time.NewTicker(time.Second)
|
||||
|
|
|
@ -185,12 +185,12 @@ func recvICMP(conn icmp.PacketConn, recv chan<- *Packet) {
|
|||
my.Unmarshal(bytes[4:n])
|
||||
|
||||
if my.TYPE != (uint32)(DATA) || my.ENDTYPE != (uint32)(DATA) {
|
||||
fmt.Printf("processPacket diff type %s %d %d \n", my.ID, my.TYPE, my.ENDTYPE)
|
||||
//fmt.Printf("processPacket diff type %s %d %d \n", my.ID, my.TYPE, my.ENDTYPE)
|
||||
continue
|
||||
}
|
||||
|
||||
if my.Data == nil {
|
||||
fmt.Printf("processPacket data nil %s\n", my.ID)
|
||||
//fmt.Printf("processPacket data nil %s\n", my.ID)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ func (p *Server) Run() {
|
|||
|
||||
p.localConnMap = make(map[string]*ServerConn)
|
||||
|
||||
recv := make(chan *Packet, 1000)
|
||||
recv := make(chan *Packet, 10000)
|
||||
go recvICMP(*p.conn, recv)
|
||||
|
||||
interval := time.NewTicker(time.Second)
|
||||
|
|
Loading…
Add table
Reference in a new issue