File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -246,7 +246,6 @@ void ShubLoop(Shub* shub)
246
246
ShubMessageHdr * hdr = (ShubMessageHdr * )(shub -> out_buffer + pos );
247
247
int chan = hdr -> chan ;
248
248
n = pos + sizeof (ShubMessageHdr ) + hdr -> size <= shub -> out_buffer_used ? hdr -> size + sizeof (ShubMessageHdr ) : shub -> out_buffer_used - pos ;
249
- pos += sizeof (ShubMessageHdr );
250
249
if (!write_socket (chan , (char * )hdr , n )) {
251
250
shub -> params -> error_handler ("Failed to write to local socket" , SHUB_RECOVERABLE_ERROR );
252
251
close_socket (shub , chan );
@@ -269,9 +268,11 @@ void ShubLoop(Shub* shub)
269
268
}
270
269
tail -= n ;
271
270
} while (tail != 0 );
271
+
272
272
pos = shub -> out_buffer_used ;
273
273
break ;
274
274
}
275
+ pos += n ;
275
276
}
276
277
memcpy (shub -> out_buffer , shub -> out_buffer + pos , shub -> out_buffer_used - pos );
277
278
shub -> out_buffer_used -= pos ;
You can’t perform that action at this time.
0 commit comments