srtgo icon indicating copy to clipboard operation
srtgo copied to clipboard

Windows build and SetDeadline deadlock fixes

Open ddv2005 opened this issue 10 months ago • 0 comments

There are 2 fixes:

  1. accept.go can't be compiled under Windows because of missing syscall.SizeofSockaddrAny
  2. SetDeadline has deadlock because it calls pd.lock.Lock() at the start and then in unblock it tried to call pd.lock.Lock() again. But mutexes in go are different from posix because Go mutexes cannot be locked again even in the same thread/coroutine. Also, locks in poll.unblock are unnecessary and can be replaced by one SwapInt32 instead of load and store.

ddv2005 avatar Apr 22 '24 05:04 ddv2005