Skip to content

Commit

Permalink
fixed a few small timing bugs in Mojo::Server::Daemon
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 10, 2013
1 parent 98a9919 commit c5eb1a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -2,6 +2,7 @@
3.95 2013-04-11
- Improved documentation. (jberger, sri)
- Improved tests.
- Fixed a few small timing bugs in Mojo::Server::Daemon.

3.94 2013-04-08
- Added is_hidden method to Mojolicious::Routes.
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Server/Daemon.pm
Expand Up @@ -210,7 +210,7 @@ sub _read {
my ($self, $id, $chunk) = @_;

# Make sure we have a transaction and parse chunk
my $c = $self->{connections}{$id};
return unless my $c = $self->{connections}{$id};
my $tx = $c->{tx} ||= $self->_build_tx($id, $c);
warn "-- Server <<< Client (@{[$tx->req->url->to_abs]})\n$chunk\n" if DEBUG;
$tx->server_read($chunk);
Expand All @@ -234,7 +234,7 @@ sub _write {
my ($self, $id) = @_;

# Not writing
my $c = $self->{connections}{$id};
return unless my $c = $self->{connections}{$id};
return unless my $tx = $c->{tx};
return unless $tx->is_writing;

Expand Down

0 comments on commit c5eb1a0

Please sign in to comment.