Comparison

net/server_event.lua @ 7419:325c03f5481b

net.server_event: Collect entire one line function on one line
author Kim Alvefur <zash@zash.se>
date Wed, 04 May 2016 15:20:33 +0200
parent 7399:066a4dfdac18
child 7420:3fc5560557a5
comparison
equal deleted inserted replaced
7399:066a4dfdac18 7419:325c03f5481b
586 if "wantwrite" == err then -- need to read on write event 586 if "wantwrite" == err then -- need to read on write event
587 if not interface.eventwrite then -- register new write event if needed 587 if not interface.eventwrite then -- register new write event if needed
588 interface.eventwrite = addevent( base, interface.conn, EV_WRITE, interface.writecallback, cfg.WRITE_TIMEOUT ) 588 interface.eventwrite = addevent( base, interface.conn, EV_WRITE, interface.writecallback, cfg.WRITE_TIMEOUT )
589 end 589 end
590 interface.eventreadtimeout = addevent( base, nil, EV_TIMEOUT, 590 interface.eventreadtimeout = addevent( base, nil, EV_TIMEOUT,
591 function( ) 591 function( ) interface:_close() end, cfg.READ_TIMEOUT)
592 interface:_close()
593 end, cfg.READ_TIMEOUT
594 )
595 debug( "wantwrite during read attempt, reg it in writecallback but dont know what really happens next..." ) 592 debug( "wantwrite during read attempt, reg it in writecallback but dont know what really happens next..." )
596 -- to be honest i dont know what happens next, if it is allowed to first read, the write etc... 593 -- to be honest i dont know what happens next, if it is allowed to first read, the write etc...
597 else -- connection was closed or fatal error 594 else -- connection was closed or fatal error
598 interface.fatalerror = err 595 interface.fatalerror = err
599 debug( "connection failed in read event:", interface.fatalerror ) 596 debug( "connection failed in read event:", interface.fatalerror )