Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Net::HTTP::NB blocks on connect()

Open
#68 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
perl
Domain
networking

Research direction

Start at the Net::HTTP::NB->new entry point with Blocking => 0 and reproduce the reported strace showing connect() returning synchronously. Trace how the blocking option is applied during socket setup, then establish whether non-blocking connect() is expected or identify the change and regression coverage needed to make it so.

Written by the indexing model from the issue text.

Description

Saw this in an strace:

socket(AF_INET, SOCK_STREAM, IPPROTO_TCP) = 3<TCP:[4870277]>
ioctl(3<TCP:[4870277]>, TCGETS, 0x7ea8924c) = -1 ENOTTY (Inappropriate ioctl for
 device)
_llseek(3<TCP:[4870277]>, 0, 0x7ea892a8, SEEK_CUR) = -1 ESPIPE (Illegal seek)
ioctl(3<TCP:[4870277]>, TCGETS, 0x7ea8924c) = -1 ENOTTY (Inappropriate ioctl for
 device)
_llseek(3<TCP:[4870277]>, 0, 0x7ea892a8, SEEK_CUR) = -1 ESPIPE (Illegal seek)
fcntl64(3<TCP:[4870277]>, F_SETFD, FD_CLOEXEC) = 0
connect(3<TCP:[4870277]>, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_
addr("208.74.123.84")}, 16) = 0

This comes from just calling:

my $s = Net::HTTP::NB->new(
    Host => 'cpanel.net',
    Blocking => 0,
) or die;

Is this a bug, or a known part of the design? Is there any way to get a non-blocking connect()?

Dominant language
Perl
Stars
20
Forks
27
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from libwww-perl/Net-HTTP

All issues in libwww-perl/Net-HTTP

Similar issues

More Perl issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.