Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#27 Illegal seek error in SOAP::Transport::TCP

0.65
closed-fixed
nobody
Transport (26)
5
2007-10-04
2003-06-05
Anonymous
No

this code causes the bug:

use SOAP::Transport::TCP;

my $daemon = SOAP::Transport::TCP::Server
-> new (LocalAddr => 'localhost', LocalPort =>
4000, Listen => 5, Reuse => 1, Timeout => 2)
-> dispatch_to('Temperatures')
;
print "Contact to SOAP server at ", join(':',
$daemon->sockhost, $daemon->sockport), "\n";
$daemon->handle;

package Temperatures;

sub f2c {
my ($class, $f) = @_;
return 5/9*($f-32);
}

sub c2f {
my ($class, $c) = @_;
return 32+$c*9/5;
}

And this is the output:
Contact to SOAP server at 127.0.0.1:4000
IO::Select->select() returned error: Illegal seek at
/usr/share/perl5/SOAP/Transport/TCP.pm line 207

In fact, the error happens at a call to
IO::Select->select() in IO::SessionSet at line 123.

The error is due to the Timeout => 2 parameters wich is
passed to IO::Socket.

Discussion

  • Byrne Reese
    Byrne Reese
    2004-01-12

    • labels: --> Transport
    • milestone: --> 0.65
    • status: open --> open-fixed
     
  • Byrne Reese
    Byrne Reese
    2004-01-12

    Logged In: YES
    user_id=28043

    Fixed. I have changed the 'croak' to a 'warn' if no sockets
    are available for reading or writing. This enables the
    socket to timeout and relisten, if of course a timeout value
    has been specified.

     
  • Martin Kutter
    Martin Kutter
    2007-10-04

    • status: open-fixed --> closed-fixed