mirror of
https://github.com/sot-tech/mochi.git
synced 2026-05-14 20:08:36 -07:00
udp: Use net.IP inputs for connection ID generation
Add enum for action IDs Remove unnecessary length check
This commit is contained in:
@@ -74,7 +74,7 @@ func (s *Server) serve(listenAddr string) error {
|
||||
response, action := s.handlePacket(buffer[:n], addr)
|
||||
pool.GiveSlice(buffer)
|
||||
|
||||
if response != nil {
|
||||
if len(response) > 0 {
|
||||
sock.WriteToUDP(response, addr)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user