tweaks: add comment; show only pending messages

This commit is contained in:
Eric House 2017-10-30 19:07:13 -07:00
parent d2897d6dc8
commit 23f0d54f63
2 changed files with 5 additions and 1 deletions

View file

@ -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

View file

@ -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 );
}
}