openresty / openresty/lua-nginx-module

tcpsock:receive() returning boolean

Open
#2,130 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
11.8k
Forks
2.1k
Avg merge
6h 1m
Merged PRs (30d)
6

Description

openresty/1.21.4.1

I am seeing tcpsock:receive("*l") returning boolean true as data, no err or partial.
Trying to read again from the same socket returns err=socket busy reading

I do not see this boolean return as documented. What is happening here?

I am running this from resty cli, and using

sslhandhake
ngx.thread.spawn(connect__maby_sslhandshake__send__receive__setkeepalive)

code works fine single threaded

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start at the tcpsock:receive("*l") call in the resty CLI scenario, then reproduce the sequence with sslhandhake, ngx.thread.spawn(connect__maby_sslhandshake__send__receive__setkeepalive), and keepalive on OpenResty 1.21.4.1. Compare the first and second reads and capture the returned data, err/partial, and socket-busy state; done means the return behavior is established or a minimal reproducer identifies it.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.