diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-07-15 15:45:48 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-07-15 15:45:48 -0700 |
| commit | 7f95fde8d752dd93c20ff0a209334f4aec549111 (patch) | |
| tree | f6226f1e9741ae855a96d215600dacb006927434 /src/core/pipe.c | |
| parent | 5fe345c66139fc3242c4fdbd78bf05e5670581e8 (diff) | |
| download | nng-7f95fde8d752dd93c20ff0a209334f4aec549111.tar.gz nng-7f95fde8d752dd93c20ff0a209334f4aec549111.tar.bz2 nng-7f95fde8d752dd93c20ff0a209334f4aec549111.zip | |
Some initial progress on *connect* async.
This actually is breaking at the moment, because we don't have
good integration with timeouts, and there are some frustrating
races with timeouts at points that can cause apparent hangs.
Diffstat (limited to 'src/core/pipe.c')
| -rw-r--r-- | src/core/pipe.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/core/pipe.c b/src/core/pipe.c index 8f2099a9..f1e8014e 100644 --- a/src/core/pipe.c +++ b/src/core/pipe.c @@ -91,8 +91,6 @@ nni_pipe_send(nni_pipe *p, nni_aio *aio) void nni_pipe_close(nni_pipe *p) { - nni_sock *sock = p->p_sock; - nni_mtx_lock(&p->p_mtx); if (p->p_reap == 1) { // We already did a close. @@ -200,18 +198,13 @@ nni_pipe_create(nni_pipe **pp, nni_sock *sock, nni_tran *tran) nni_pipe_destroy(p); return (rv); } - p->p_sock = sock; // Make a copy of the transport ops. We can override entry points // and we avoid an extra dereference on hot code paths. p->p_tran_ops = *tran->tran_pipe; - // Save the protocol destructor. - p->p_proto_dtor = sock->s_pipe_ops.pipe_fini; - // Initialize protocol pipe data. - rv = sock->s_pipe_ops.pipe_init(&p->p_proto_data, p, sock->s_data); - if (rv != 0) { + if ((rv = nni_sock_pipe_init(sock, p)) != 0) { nni_pipe_destroy(p); return (rv); } |
