Permalink
Browse files

only set TCP_NODELAY if it's really TCP

  • Loading branch information...
1 parent d6dfd19 commit 8f29a892b76eed3fa2610319c3212bfcc9ac4d9c @miyagawa committed Feb 10, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/Nomo/Server.pm
View
@@ -113,8 +113,10 @@ sub process_request {
my $self = shift;
my $conn = $self->{server}->{client};
- setsockopt($conn, IPPROTO_TCP, TCP_NODELAY, 1)
- or die $!;
+ if ($conn->NS_proto eq 'TCP') {
+ setsockopt($conn, IPPROTO_TCP, TCP_NODELAY, 1)
+ or die $!;
+ }
while ( $self->{client}->{keepalive} ) {
last if !$conn->connected;

0 comments on commit 8f29a89

Please sign in to comment.