Created
July 21, 2014 17:47
-
-
Save gsalgado/817bb981d6729e6cd2df to your computer and use it in GitHub Desktop.
Inproc socket doesn't seem to be released immediately after a socket.Close()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package atest | |
import ( | |
"testing" | |
zmq "github.com/pebbe/zmq4" | |
) | |
func TestA(t *testing.T) { | |
socket, err := zmq.NewSocket(zmq.PUSH) | |
if err != nil { | |
panic(err) | |
} | |
if err = socket.Bind("inproc://input"); err != nil { | |
panic(err) | |
} | |
if err = socket.Close(); err != nil { | |
panic(err) | |
} | |
} | |
func TestB(t *testing.T) { | |
socket, err := zmq.NewSocket(zmq.PUSH) | |
if err != nil { | |
panic(err) | |
} | |
if err = socket.Bind("inproc://input"); err != nil { | |
panic(err) | |
} | |
if err = socket.Close(); err != nil { | |
panic(err) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment