Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion accept.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (s SrtSocket) Accept() (*SrtSocket, *net.UDPAddr, error) {
}
}
var addr syscall.RawSockaddrAny
sclen := C.int(syscall.SizeofSockaddrAny)
sclen := C.int(sizeofSockaddrAny)
socket, err := srtAcceptImpl(s.socket, (*C.struct_sockaddr)(unsafe.Pointer(&addr)), &sclen)
if err != nil {
return nil, nil, err
Expand Down
8 changes: 4 additions & 4 deletions poll.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,12 @@ func (pd *pollDesc) unblock(mode PollMode, pollerr, ioready bool) {
state = &pd.wrState
unblockChan = pd.unblockWr
}
pd.lock.Lock()
old := atomic.LoadInt32(state)
var old int32
if ioready {
atomic.StoreInt32(state, pollReady)
old = atomic.SwapInt32(state, pollReady)
} else {
old = atomic.LoadInt32(state)
}
pd.lock.Unlock()
if old == pollWait {
//make sure we never block here
select {
Expand Down