hello!<br><br>I have been trying the Spread perl module to write a script to send messages from a specific log file to a remote spread daemon on the same network. Here is the piece of code that use to send the messages<br>
<br>sub sendMessage {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $line = shift;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $mesg_length = length($line);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if((my $ret = Spread::multicast($mbox, SAFE_MESS, $joined[0], 0, $line))&lt;=0) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print &quot;Failed to send message (&quot;.$mesg_length.&quot; bytes) for the group [@joined[0]], reason: $sperrno message: $line&quot;;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print &quot;ret_code: $ret\n\n&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $fails++;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>}<br><br>I start the script and after a while I received the following error and no more messages are sent until I kill restart the script.
<br><br>Failed to send message (174 bytes) to group [mygroup], reason: spread_name message: &quot;hello world&quot;<br>ret_code:<br><br>It looks like that the value returned by the $sperrno variable is &quot;spread_name&quot; and that the variable $ret, which should have
<br>the error code returned, is empty or null. Iīve read the documentation and couldnīt find a reason for this behaviour... Anyone<br>has a clue of what I might be doing wrong?<br><br>Thanks in advance,<br>Gus<br><br><br>
<br><br>