bartbes/love-misc-libs — Issue #9: [lube-testing] can't update server
Author: kanade
Created: 2011-10-17 08:54:16+00:00
State: open

If I run, create a server, everything is running well.

When a client connects to the server and then I kill the server, I can't start the server again (for 20-40 seconds).

Kill the server with this code:

```
self.server.socket:close()
self.server = nil
```

And here is the errormsg:

```
Error: ./lib/LUBE/LUBE.lua:430: calling 'accept' on bad self (tcp{server} expected, got userdata)
stack traceback:
[C]: in function 'accept'
./lib/LUBE/LUBE.lua:430: in function 'accept'
./lib/LUBE/LUBE.lua:205: in function 'update'
./class/Server.lua:84: in function 'update'
[string "main.lua"]:72: in function 'update'
[string "boot.lua"]:320: in function <[string "boot.lua"]:308>
[C]: in function 'xpcall'
```

How can I kill a server correctly? Is this a bug or a fail by me?