File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -176,8 +176,8 @@ protected override void XReadActivated(Pipe pipe)
176
176
else
177
177
{
178
178
var unique = sub [ 0 ] == 0
179
- ? m_subscriptions . Remove ( sub . Slice ( 1 ) , pipe )
180
- : m_subscriptions . Add ( sub . Slice ( 1 ) , pipe ) ;
179
+ ? m_subscriptions . Remove ( size == 1 ? new Span < byte > ( ) : sub . Slice ( 1 ) , pipe )
180
+ : m_subscriptions . Add ( size == 1 ? new Span < byte > ( ) : sub . Slice ( 1 ) , pipe ) ;
181
181
182
182
// If the subscription is not a duplicate, store it so that it can be
183
183
// passed to used on next recv call.
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ You should have received a copy of the GNU Lesser General Public License
19
19
along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
*/
21
21
22
+ using System ;
22
23
using System . Diagnostics ;
23
24
using NetMQ . Core . Patterns . Utils ;
24
25
@@ -170,15 +171,15 @@ protected override bool XSend(ref Msg msg)
170
171
if ( ! m_moreOut && size > 0 && msg [ 0 ] == 1 )
171
172
{
172
173
// Process the subscription.
173
- if ( m_subscriptions . Add ( msg . Slice ( 1 ) ) )
174
+ if ( m_subscriptions . Add ( size == 1 ? new Span < byte > ( ) : msg . Slice ( 1 ) ) )
174
175
{
175
176
m_distribution . SendToAll ( ref msg ) ;
176
177
return true ;
177
178
}
178
179
}
179
180
else if ( ! m_moreOut && size > 0 && msg [ 0 ] == 0 )
180
181
{
181
- if ( m_subscriptions . Remove ( msg . Slice ( 1 ) ) )
182
+ if ( m_subscriptions . Remove ( size == 1 ? new Span < byte > ( ) : msg . Slice ( 1 ) ) )
182
183
{
183
184
m_distribution . SendToAll ( ref msg ) ;
184
185
return true ;
You can’t perform that action at this time.
0 commit comments