Comparison

net/server_event.lua @ 3458:9c3ae41e696c

net.server_select, net.server_event: Remove set_mode() call from server.link()... it can cause the last chunk of data to be discarded if shorter than buffersize (thanks to Zash for the debugging)
author Matthew Wild <mwild1@gmail.com>
date Sun, 22 Aug 2010 21:12:22 +0100
parent 3422:331547f2393e
child 3649:ae99396ee261
comparison
equal deleted inserted replaced
3457:24d2c9be0149 3458:9c3ae41e696c
842 signal_events[signal_num] = base:addevent(signal_num, EV_SIGNAL, _handler); 842 signal_events[signal_num] = base:addevent(signal_num, EV_SIGNAL, _handler);
843 return signal_events[signal_num]; 843 return signal_events[signal_num];
844 end 844 end
845 845
846 local function link(sender, receiver, buffersize) 846 local function link(sender, receiver, buffersize)
847 sender:set_mode(buffersize);
848 local sender_locked; 847 local sender_locked;
849 848
850 function receiver:ondrain() 849 function receiver:ondrain()
851 if sender_locked then 850 if sender_locked then
852 sender:resume(); 851 sender:resume();