[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[omnibib-devel] Sobre o problema no Socket.pm
From: |
Rafael Ávila |
Subject: |
[omnibib-devel] Sobre o problema no Socket.pm |
Date: |
Mon, 13 Oct 2003 21:22:39 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.4) Gecko/20031010 Debian/1.4-6 |
Me ocorreu agora que pode ser pelo seguinte:
dentro do Slave.pm, na função main, está o loop que fica recebendo
comandos dos clientes:
while (<$in>) {
# the following regexp has the purpose of eliminating white space
# and line terminators from the beginning and the end of the string
s/\s*([^\n\r]+?)\s+$/$1/;
if (/^\\(\w+)\s*(.*)/) { # command
$self->process_command($1, $2);
} else { # query
@{$self->{entries}} = ();
if ($self->{query_type} eq "fetch") {
$self->exec_fetch($_);
} else {
$self->exec_search($_);
};
$self->print_entries if @{$self->{entries}};
$self->print("% End of query\n");
};
};
O "while (<$in>)" é onde o Perl bloqueia lendo o socket conectado ao
cliente, esperando ele entrar com uma linha de comandos.
O que pode estar acontecendo é que o cliente se desconecta e o descritor
do socket se torna inválido. Não consegui pensar numa maneira de
verificar isso.
Rafael
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [omnibib-devel] Sobre o problema no Socket.pm,
Rafael Ávila <=