mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Skip creating the named pipe on the client if we're using http signaling
* Blocks waiting on the open for write (`cat > signal`), at least for me.
This commit is contained in:
parent
62e6704d1f
commit
0abb3bd856
1 changed files with 12 additions and 10 deletions
|
@ -331,19 +331,21 @@ func main() {
|
|||
|
||||
log.Println("starting")
|
||||
|
||||
// This FIFO receives signaling messages.
|
||||
err = syscall.Mkfifo("signal", 0600)
|
||||
if err != nil {
|
||||
if err.(syscall.Errno) != syscall.EEXIST {
|
||||
if offerURL == "" {
|
||||
// This FIFO receives signaling messages.
|
||||
err = syscall.Mkfifo("signal", 0600)
|
||||
if err != nil {
|
||||
if err.(syscall.Errno) != syscall.EEXIST {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
signalFile, err := os.OpenFile("signal", os.O_RDONLY, 0600)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer signalFile.Close()
|
||||
go readSignalingMessages(signalFile)
|
||||
}
|
||||
signalFile, err := os.OpenFile("signal", os.O_RDONLY, 0600)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer signalFile.Close()
|
||||
go readSignalingMessages(signalFile)
|
||||
|
||||
webrtc.SetLoggingVerbosity(1)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue