Commit 37e6334
committed
Bugfix: socket_t move assignment doesn't initialize ctxptr
Until now, we only assigned the _handle on
`zmq::socket_t::operator=(socket_t&&)`. This manifests when trying to
monitor a socket initialized by that constructor.
To avoid changing the public interface of the socket_t class, we tested
for the specific monitor usecase, since it's the only class accessing
zmq::socke_t::ctxptr.
NOTE: When running the new unit-test without the fix, it might hang on
`zmq_socket_monitor(socket_, NULL, 0)`. We haven't figured out the cause
for that, but we deemed it unimportant (or at least out of scope).1 parent 89f4d1b commit 37e6334
2 files changed
+20
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
145 | 160 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2103 | 2103 | | |
2104 | 2104 | | |
2105 | 2105 | | |
| 2106 | + | |
2106 | 2107 | | |
2107 | 2108 | | |
2108 | 2109 | | |
| |||
2121 | 2122 | | |
2122 | 2123 | | |
2123 | 2124 | | |
| 2125 | + | |
2124 | 2126 | | |
2125 | 2127 | | |
2126 | 2128 | | |
| |||
2143 | 2145 | | |
2144 | 2146 | | |
2145 | 2147 | | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
2146 | 2151 | | |
2147 | 2152 | | |
2148 | 2153 | | |
| |||
0 commit comments