0

I'm using the miniboa library for non-blocking telnet-style socket programming.

The library includes a demo of a simple chat server.

On line 809, in the poll() function, the system uses the select.select() function. When running the demo server in the miniboa.py file, the server doesn't block on this function; it executes and continues without skipping a beat.

I am writing a MUD with networking code based on that very code, however in my MUD server (see the link below), the server blocks on that very same call, every single time.

In my MUD's network.py library, on line 68, the server executes the poll() function. This is the same function that executes in the simple chat server, except when it executes in my MUD server, it blocks on the select.select() call.

I don't know why it's blocking, but it's blocking, and the loop doesn't repeat until after a user sends data. If nobody sends anything, the server just waits.

Does anyone have any idea why this might be? I'll be happy to answer any questions I can about the code, and it's open-source so you can see all the code and play with it if you want.

I appreciate any help you all might be able to provide. I've been dreaming of making a MUD since I first played one as a kid many years ago, and I'm afraid to continue working on it until I get this bug sorted. Until I fix this bug, the server won't work the way it ought to.

TL;DR: My server is getting stuck in the select.select() function while it waits for client input, though it's not supposed to pause there. I can't figure out why it's blocking.

Textmode
  • 509
  • 3
  • 18

0 Answers0