mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-06 20:45:54 +01:00
tweaks: add comment; show only pending messages
This commit is contained in:
parent
d2897d6dc8
commit
23f0d54f63
2 changed files with 5 additions and 1 deletions
|
@ -59,8 +59,9 @@ echo "SELECT dead as d,connname,room,lang as lg,clntVers as cv ,ntotal as t,nper
|
|||
| psql xwgames
|
||||
|
||||
# Messages
|
||||
echo "Unack'd msgs count:" $(psql -t xwgames -c "select count(*) FROM msgs where stime = 'epoch' AND connname IN (SELECT connname from games $QUERY);")
|
||||
echo "SELECT id,connName,hid as h,token,ctime,stime,devid,msg64 "\
|
||||
"FROM msgs WHERE connname IN (SELECT connname from games $QUERY) "\
|
||||
"FROM msgs WHERE stime = 'epoch' AND connname IN (SELECT connname from games $QUERY) "\
|
||||
"ORDER BY ctime DESC, connname LIMIT $LIMIT;" \
|
||||
| psql xwgames
|
||||
|
||||
|
|
|
@ -1347,6 +1347,9 @@ handleMsgsMsg( const AddrInfo* addr, bool sendFull,
|
|||
logf( XW_LOGVERBOSE0, "%s: wrote %d bytes", __func__, nwritten );
|
||||
if ( sendFull && nwritten >= 0 && (size_t)nwritten == out.size() ) {
|
||||
dbmgr->RecordSent( &msgIDs[0], msgIDs.size() );
|
||||
// This is wrong: should be removed when ACK returns and not
|
||||
// before. But for some reason if I make that change apps wind up
|
||||
// stalling.
|
||||
dbmgr->RemoveStoredMessages( msgIDs );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue