Use random local session ID

This commit is contained in:
Nonoo 2020-10-23 23:24:17 +02:00
parent efd81c9568
commit 0c6812396c

View file

@ -159,9 +159,8 @@ func (s *streamCommon) init(name string, portNumber int) error {
}
// Constructing the local session ID by combining the local IP address and port.
// laddr := s.conn.LocalAddr().(*net.UDPAddr)
// s.localSID = binary.BigEndian.Uint32(laddr.IP[len(laddr.IP)-4:])<<16 | uint32(laddr.Port&0xffff)
s.localSID = 0x8aff0539
laddr := s.conn.LocalAddr().(*net.UDPAddr)
s.localSID = binary.BigEndian.Uint32(laddr.IP[len(laddr.IP)-4:])<<16 | uint32(laddr.Port&0xffff)
s.readChan = make(chan []byte)
s.readerCloseNeededChan = make(chan bool)