1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-23 03:50:32 +08:00

fix(tcp): recv on new endpoint

This commit is contained in:
源文雨
2024-07-16 23:04:19 +09:00
parent 39d8d5b755
commit 9a63b3c886
3 changed files with 39 additions and 3 deletions

View File

@@ -17,6 +17,9 @@ func (ep *EndPoint) Network() string {
}
func (ep *EndPoint) Euqal(ep2 p2p.EndPoint) bool {
if ep == nil || ep2 == nil {
return ep == nil && ep2 == nil
}
udpep2, ok := ep2.(*EndPoint)
if !ok {
return false