mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
close socket when done
This commit is contained in:
parent
8a51d5f3e4
commit
cd699ba547
1 changed files with 1 additions and 2 deletions
|
@ -265,6 +265,7 @@ send_msg( const unsigned char* buf, int len )
|
|||
assert( nwritten == sizeof(hdr) );
|
||||
nwritten = write( sock, buf, len );
|
||||
assert( nwritten == len );
|
||||
close( sock );
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -340,8 +341,6 @@ do_fetch( int sockfd, const char** connNames, int nConnNames,
|
|||
if ( bufp + len > end ) {
|
||||
break;
|
||||
}
|
||||
fprintf( stderr, "%s: writing %d bytes to fd %d\n", __func__,
|
||||
len, fd );
|
||||
nwritten = write( fd, bufp, len );
|
||||
assert( nwritten == len );
|
||||
bufp += len;
|
||||
|
|
Loading…
Add table
Reference in a new issue