Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove limitation #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Remove limitation #98

wants to merge 1 commit into from

Conversation

pwillemse
Copy link

When trying to send snmp messages I discovered that jython was hanging when sending messages > 64k. In jython 2.7.0 it worked fine. In _socket.py a limitation on the message size was found. Why just truncating a message and not handling the rest of the message? After removal it worked fine.

@Stewori
Copy link
Contributor

Stewori commented Jan 26, 2018

For me this looks like self.channel.bytesBeforeUnwritable() returns a too restrictive value. I suspect that bytesBeforeUnwritable() does not exist for nothing, maybe a better solution would be to fix it. However, I'm no expert in this area and must admit the I actually don't know what bytesBeforeUnwritable() is about and what consequences it can have to ignore it.

@pwillemse
Copy link
Author

pwillemse commented Jan 26, 2018

Why was this code not present in jython 2.7.0 and added in 2.7.1? Was this only because some one was worried about the size of the packets? See FIXME label in the code
One thing for sure: SNMP is broken when sending packets > 64k.

@jeff5
Copy link
Member

jeff5 commented Jan 28, 2018

The change that added this (b348d77 and #45) is offered as a fix for http://bugs.jython.org/issue2508, and the present PR essentially reverts the code change in that fix, re-opening the bug. This may be an improvement, but it isn't going to provide correct behaviour.

It was pointed out later that the code change in #45 has introduced another problem http://bugs.jython.org/issue2618, which I guess is what the OP is struggling with. @Stewori : I'd say bytesBeforeUnwritable exists for a reason, but perhaps not the one we're using it for here.

@jimbaker : Is it possible we are providing non-blocking semantics in circumstances where an application really needs the library to block?

@jeff5
Copy link
Member

jeff5 commented Jun 4, 2020

Unfortunately a PR (unlike an issue) cannot be transferred to the new official home at https://github.com/jython/jython. Keeping this open in the frozen-mirror to allow for further consideration.

@jeff5 jeff5 added the queried Review awaits proposer's response. label Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
queried Review awaits proposer's response.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants