Eric House
a444786a28
reduce logging
2010-10-05 20:57:19 -07:00
Eric House
1ff4d67bc0
block TERM and INT from all but the main thread. (Pretty much untested; doesn't fix hang-on-SIGINT.)
2010-10-04 20:03:00 -07:00
Andy2
c44324a32a
log, for now as I've seen assertions failures suggesting a race, the
...
set of checked-out sockets at insert and remove time.
2010-09-23 06:34:18 -07:00
Andy2
be23e06b60
use read_packet to replace duplicate code
2010-09-21 06:38:43 -07:00
Eric House
4ad735124c
add logging and assertions. There's a race condition in cref
...
recycling and may be one in tpool socket checking-out.
2010-09-20 22:11:13 -07:00
Andy2
df1ec1628a
replace killSocket(), which jumped right into crefmgr and could get
...
ahead of processing data arrived on the same socket, with EnqueueKill
that adds to same queue from which data's taken. So if device dies
immediately after sending data there won't be a race between closing
the cref (if this is the last open socket) and handling the data. I'm
still dying with assert fails when running 100 games at once, but much
less frequently
2010-09-18 08:47:56 -07:00
Andy2
53b3d7c32f
enque sockets in new object that contains type so later other events
...
(e.g. socket closes) can also be queued; track what sockets are
currently being handled so no two threads are ever processing events
on same socket. This makes running 'NGAMES=50
./scripts/discon_ok2.sh' crash very infrequently rather than every
time, but the race condition in crefmgr remains. Queuing socket
closes should help.
2010-09-18 07:44:14 -07:00
Eric House
ddcc338ed7
don't break out of loop without unlocking mutex
2010-09-14 21:16:16 -07:00
Eric House
89e7a506a4
reduce amount of logging
2010-09-08 20:28:14 -07:00
ehouse
53133839a4
don't log list of sockets by default
2009-08-20 03:50:40 +00:00
ehouse
503db9cc6f
up copyright
2009-07-30 12:54:17 +00:00
ehouse
6b1cf247bf
Don't alloc storage for fds and log buffer each time through poll
...
loop; instead reuse and realloc when needs to grow.
2009-07-28 05:08:15 +00:00
ehouse
dddd5e1dd8
clean up logging. I got some cores that suggest overflow. This fixes
...
that if indeed it was happening. Problems with sockets disappearing
while in poll may remain.
2009-07-16 04:43:33 +00:00
ehouse
582eb88f9a
int->bool
2009-07-13 02:58:16 +00:00
ehouse
a680a6e5fe
Always close sockets we're done with. Otherwise they leak -- don't get reused.
2009-07-06 01:32:30 +00:00
ehouse
1ac4ef3bc6
Attempt to detect connections that are duplicates by checking if that
...
socket is already in a connection. This doesn't seem to always work,
and I may be leaking cref instances when it does, so needs debugging
still.
2009-02-01 16:00:20 +00:00
ehouse
ea6fff8f28
replace int with bool where appropriate; fix to compile with newer g++
2008-12-30 05:13:30 +00:00
ehouse
767b9f2908
initialize mutex before using; fixes a hang since could never aquire
...
lock. (This bug has always been there, but didn't matter before;
maybe pthreads changed.) Comment out self-spawning stuff until can
fix df-transfer problems. Other minor changes around logging.
2007-02-06 05:52:22 +00:00
ehouse
4c2259400a
include result of strerror in messages logging errno
2007-02-03 21:35:07 +00:00
ehouse
b29bde8e37
include stdio.h for freebsd
2006-03-21 04:05:33 +00:00
ehouse
92485783af
update email address in header comments: no code change
2006-01-08 01:25:02 +00:00
ehouse
d17165a678
add header needed on some installations
2005-10-23 21:35:19 +00:00
ehouse
deb0a2d265
shutdown in response to SIGINT
2005-10-23 15:49:48 +00:00
ehouse
74b6ccbd52
cleanup ctrl printing; repeat most recent command; cleanup internal names.
2005-10-16 01:19:25 +00:00
ehouse
ecf5875d7e
capitalize public methods on timermgr (no code change)
2005-10-15 15:49:22 +00:00
ehouse
eb8301ade7
return error to client when flags indicate old version; close sockets
...
when error occurs in processing message.
2005-10-14 08:29:58 +00:00
ehouse
4e5f69f4e8
rename states so can format to 80 cols; add log level param. No
...
change to functionality in this checkin.
2005-10-02 16:08:42 +00:00
ehouse
235556240f
Don't close the underlying socket. Not sure yet when I should close a
...
socket that hasn't returned an error. Maybe that's the client's job.
2005-09-05 15:45:22 +00:00
ehouse
89f1eca340
log tweak
2005-09-04 20:44:46 +00:00
ehouse
8f32f4f99a
loads of changes: get settings from config file; remove sockets and
...
kill crefs via state machine, and protect access to a cref so it can
die without another thread being in it; do timers via timeout to
poll() rather than interrupt (and integrate into state machine);
detect when all players are present and change state so new
connections on that cookie will get a new cref.
2005-09-02 06:56:34 +00:00
ehouse
370c2f82f2
fix leak
2005-07-05 21:52:24 +00:00
ehouse
3054637842
heartbeats: send to clients in connection response; note when
...
heartbeat and other messages arrive; and periodically reap sockets
that haven't been active in long enough.
2005-06-23 04:26:44 +00:00
ehouse
92c2017cae
use rwlock instead of mutex
2005-04-20 12:06:25 +00:00
ehouse
54843e68bf
fix warnings
2005-04-08 14:28:04 +00:00
ehouse
9ee54bf8a3
don't assert after poll returns! Instead close socket on hangup.
2005-04-03 17:02:09 +00:00
ehouse
a024c7ccd5
first checked in. works but not robust
2005-03-31 02:11:51 +00:00