Software /
code /
prosody
Comparison
net/server.lua @ 1804:f0f5ff6f82d6
net.server: Fix traceback when closing connections with buffered data get closed during send
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 21 Sep 2009 13:53:59 +0100 |
parent | 1785:17c0fb598c97 |
child | 1806:c55e06eb53b2 |
child | 1863:51b1612325e6 |
comparison
equal
deleted
inserted
replaced
1802:07c4f6fdd27c | 1804:f0f5ff6f82d6 |
---|---|
361 end | 361 end |
362 else | 362 else |
363 send( socket, table_concat( bufferqueue, "", 1, bufferqueuelen ), 1, bufferlen ) -- forced send | 363 send( socket, table_concat( bufferqueue, "", 1, bufferqueuelen ), 1, bufferlen ) -- forced send |
364 end | 364 end |
365 end | 365 end |
366 if not handler then return true; end | |
366 _ = shutdown and shutdown( socket ) | 367 _ = shutdown and shutdown( socket ) |
367 socket:close( ) | 368 socket:close( ) |
368 _sendlistlen = removesocket( _sendlist, socket, _sendlistlen ) | 369 _sendlistlen = removesocket( _sendlist, socket, _sendlistlen ) |
369 _socketlist[ socket ] = nil | 370 _socketlist[ socket ] = nil |
370 if handler then | 371 if handler then |